This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author benjamin.peterson
Recipients Trundle, barry, benjamin.peterson, eric.araujo, jcea, michael.foord, ncoghlan, r.david.murray, rhettinger
Date 2011-06-03.21:03:02
SpamBayes Score 6.7077066e-11
Marked as misclassified No
Message-id <1307134983.1.0.68986979723.issue12248@psf.upfronthosting.co.za>
In-reply-to
Content
No additional type-checking was added. The problem is that __dir__ didn't work on old-style classes at all in 2.7.1:

$ python
Python 2.7.1 (r271:86832, Mar 24 2011, 22:44:47)
[GCC 4.4.5] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> class Foo:
... def __dir__(self):
... return ['a', 'b', 'c']
...
>>> class Bar:
... def __dir__(self):
... return ('a', 'b', 'c')
...
>>> print dir(Foo())
['__dir__', '__doc__', '__module__']
>>> print dir(Bar())
['__dir__', '__doc__', '__module__']

Loosening type-checks on dir() is fine with me but is really a 3.3 issue.
History
Date User Action Args
2011-06-03 21:03:03benjamin.petersonsetrecipients: + benjamin.peterson, barry, rhettinger, jcea, ncoghlan, eric.araujo, r.david.murray, michael.foord, Trundle
2011-06-03 21:03:03benjamin.petersonsetmessageid: <1307134983.1.0.68986979723.issue12248@psf.upfronthosting.co.za>
2011-06-03 21:03:02benjamin.petersonlinkissue12248 messages
2011-06-03 21:03:02benjamin.petersoncreate