[issue12248] __dir__ semantics changed in Python 2.7.2

Benjamin Peterson report at bugs.python.org
Sat Jun 4 03:52:42 CEST 2011


Benjamin Peterson <benjamin at python.org> added the comment:

2011/6/3 Nick Coghlan <report at bugs.python.org>:
>
> Nick Coghlan <ncoghlan at gmail.com> added the comment:
>
> Ah, I wondered about that when I saw Barry was using old-style classes in his example. Perhaps the answer then is to add a PyInstance_Check() to skip invocation of __dir__() completely for old-style classes?

Uh, well, part of point of my checkin was to fix old style class
__dir__(). I think this is a bug in the package we're just exposing.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue12248>
_______________________________________


More information about the Python-bugs-list mailing list