Overloading operators for currying, a PEP309 suggestion
bh at intevation.de
Tue Mar 11 15:38:41 CET 2003
Stephen Horne <intentionally at blank.co.uk> writes:
> I would prefer defining the __len__, __getitem__, __setitem__ and
> __delitem__ methods to allow direct manipulation (and creation and
> deletion) of the closure.
That would mean that the length of a function with no arguments is 0,
right? That's bad and will likely introduce subtle bugs because then all
functions with no arguments are suddenly considered false.
What about other callable objects? Classes, methods or instances that
have a __call__ method (They might even implement it through
Intevation GmbH http://intevation.de/
More information about the Python-list