Message173225
Here is a somewhat simpler way to reproduce (following the same definition of x):
>>> dir(x)
...
TypeError: object does not provide __dir__
>>> x.__dir__
<built-in method __dir__ of cell object at 0x10c182950>
>>> dir(x)
['__class__', '__delattr__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__gt__', '__hash__', '__init__', '__le__', '__lt__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', 'cell_contents']
The dir() documentation says, "If the object has a method named __dir__(), this method will be called and must return the list of attributes."
(from http://docs.python.org/py3k/library/functions.html#dir ) |
|
Date |
User |
Action |
Args |
2012-10-18 02:06:39 | chris.jerdonek | set | recipients:
+ chris.jerdonek, Arfrever, christopherthemagnificent, kushal.das |
2012-10-18 02:06:39 | chris.jerdonek | set | messageid: <1350525999.62.0.331075569126.issue16268@psf.upfronthosting.co.za> |
2012-10-18 02:06:39 | chris.jerdonek | link | issue16268 messages |
2012-10-18 02:06:39 | chris.jerdonek | create | |
|