[issue643841] New class special method lookup change

John Krukoff report at bugs.python.org
Fri Mar 28 18:54:52 CET 2008


John Krukoff <helot at comcast.net> added the comment:

I was just bit by this today in converting a proxy class from old style
to new style. The official documentation was of no help in discoverting
that neither __getattr__ or __getattribute__ are used to look up magic
attribute names. Even the link to "New-style Classes" off the
development documentation page is useless, as none of the resources
there (http://www.python.org/doc/newstyle/) mention the incompatible change.

This seems like an issue that is going to come up more frequently as
python 3000 pushes everyone to using only new style classes. It'd be
very useful if whatever conversion tool we get, or the python 3000
standard library includes a proxy class or metaclass that is able to
help with this conversion, such as this one:
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/252151

Though preferably with some knowledge of all exising magic names.

----------
assignee:  -> georg.brandl
components: +Documentation -None
nosy: +georg.brandl, jkrukoff
versions: +Python 2.2.1, Python 2.2.2, Python 2.2.3, Python 2.3, Python 2.4, Python 2.5, Python 2.6

____________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue643841>
____________________________________


More information about the Python-bugs-list mailing list