Message137587
| 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. |
|