[issue12248] __dir__ semantics changed in Python 2.7.2

Benjamin Peterson report at bugs.python.org
Fri Jun 10 00:43:40 CEST 2011


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

2011/6/9 Barry A. Warsaw <report at bugs.python.org>:
>
> Barry A. Warsaw <barry at python.org> added the comment:
>
> Raymond, I like your patch and I think it addresses the issue nicely.  I made one small change, which is to add a test for non-list-sequenceness instead of changing the existing __dir__is_list test.  I think both tests are useful to keep.
>
> Benjamin, what do you think about this for 2.7.2?

My preference is to leave 2.7 alone (actually all maintenance
releases) and apply the patch to 3.3. It seems to me the type
restricts are tangentially only related to the issue. There's no need
to change the behavior for new-style classes, too.

----------

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


More information about the Python-bugs-list mailing list