Message26306
Logged In: YES
user_id=696687
Yes. I think this confusion was caused because of the lack
of documentation on this topic, especially on the case
described here, which seems to break some rules.
Since the "Unifying types and classes" essay seems to be the
most used Python document about this topic and, I suggest
the first rule on determining a metaclass be changed from:
"If dict['__metaclass__'] exists, it is used."
To something like:
"If dict['__metaclass__'] exists and is equal to, or a
subclass of, each of the metaclasses of the bases, it is
used; if it exists and is a base class of any metaclass of
the bases, the most specialized metaclass in the hierarchy
is used; if it exists and doesn't satisfies any of these
constraints, TypeError is raised."
|
|
Date |
User |
Action |
Args |
2007-08-23 14:34:38 | admin | link | issue1294232 messages |
2007-08-23 14:34:38 | admin | create | |
|