type function does not subtype
Greg Ewing (using news.cis.dfn.de)
me at privacy.net
Tue Mar 25 18:15:45 EST 2003
Lenard Lindstrom wrote:
> In a class definition '__metaclass__ = something' is an actual assignment
> statement.
Guido is on record as saying that's just a detail of
the current implementation.
But I've had a better idea:
def f(arg, ..., __functionclass__ = myfunkyfunc):
...
Now it's a real assignment (of a default argument value),
and it's outside the function's local scope, and it's
restricted to that function!
Happy now? :-)
--
Greg Ewing, Computer Science Dept,
University of Canterbury,
Christchurch, New Zealand
http://www.cosc.canterbury.ac.nz/~greg
More information about the Python-list
mailing list