[Python-3000] __special__ method lookup [was Re: Confused about getattr() and special methods]

Georg Brandl g.brandl at gmx.net
Tue Sep 4 12:09:12 CEST 2007


Thomas Heller schrieb:

> IIUC, in py3k, classic classes do not exist any longer, so the __metaclass__ line
> has no effect anyway.  Is this behaviour intended?

It is another incarnation of special methods being looked up on the class,
not the instance. This was always the behavior with new-style classes, see
the thread at

http://mail.python.org/pipermail/python-3000/2007-March/006261.html

for a previous discussion.

I think we should tackle this issue now and make sure the decided resolution
is consistently applied throughout Python.

Georg

-- 
Thus spake the Lord: Thou shalt indent with four spaces. No more, no less.
Four shall be the number of spaces thou shalt indent, and the number of thy
indenting shall be four. Eight shalt thou not indent, nor either indent thou
two, excepting that thou then proceed to four. Tabs are right out.



More information about the Python-3000 mailing list