Can't extend function type

Paul Rubin http
Fri Oct 7 10:25:14 EDT 2005


"Michele Simionato" <michele.simionato at gmail.com> writes:
> If you google a bit on the newsgroup, you should find a message
> from me asking about the ability to subclass FunctionType, and
> a reply from Tim Peters saying that the only reason why this
> was not done is lack of developer time and the fact that this was
> not considered an important priority.

Yeah, I just thought of it as a perverse but sort of cute way to
implement composition and similar operations on functions.  It could
be handy though, and simple to implement, if functions supported the
'*' operator for composition.  The example with a callable class is
a possible workaround, but ugly.



More information about the Python-list mailing list