[Python-Dev] Classes and Metaclasses in Smalltalk
Greg Ewing
greg@cosc.canterbury.ac.nz
Thu, 03 May 2001 13:35:29 +1200 (NZST)
"M.-A. Lemburg" <mal@lemburg.com>:
> I'm not sure I can follow you here: DictType.__repr__ is the
> representation method of the dictionary and not inherited
> from TypeType, so there should be no problem.
The problem is that DictType.__repr__ could mean either
the unbound method for finding the repr of a dictionary,
or the bound method for finding the repr of DictType
itself.
This ambiguity is inherent in the Python language as soon
as you try to make classes into instances (which you have
to do as a consequence of making types into classes).
Greg Ewing, Computer Science Dept, +--------------------------------------+
University of Canterbury, | A citizen of NewZealandCorp, a |
Christchurch, New Zealand | wholly-owned subsidiary of USA Inc. |
greg@cosc.canterbury.ac.nz +--------------------------------------+