function operators

Martin von Loewis loewis at informatik.hu-berlin.de
Tue Nov 27 09:40:28 CET 2001


"Terry Reedy" <tjreedy at home.com> writes:

> "Hans Nowak" <wurmy at earthlink.net> wrote in message
> news:3C02F6A3.941CCB5E at earthlink.net...
> > # composable_functions.py
> >
> > from __future__ import nested_scopes
> >
> > class ComposableFunction:
> >
> >     def __init__(self, f):
> >         self.f = f
> ...
> 
> Does 2.2 allow one to inherit from type 'function'?  

Yes, but that won't help: 'def foo...' would still create an instance
of type function, not of the specialization.

Regards,
Martin



More information about the Python-list mailing list