Overloading operators for currying, a PEP309 suggestion
Mike Meyer
mwm at mired.org
Tue Mar 11 12:47:00 EST 2003
Stephen Horne <intentionally at blank.co.uk> writes:
> How about...
> <function-obj> . <keyword> -> <closure-item-ref>
This already has a meaning:
>>> def f(): return 1
...
>>> f()
1
>>> f.x = 3
>>> print f.x
3
Why not use <function-obj> [ <string> ], or maybe <function-obj> {<keyword> }?
<mike
--
Mike Meyer <mwm at mired.org> http://www.mired.org/home/mwm/
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.
More information about the Python-list
mailing list