Message173197
| Author |
christopherthemagnificent |
| Recipients |
christopherthemagnificent |
| Date |
2012年10月17日.19:05:10 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1350500710.5.0.876584221442.issue16268@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
This is really short, you should spot the inconsistency in the result of the same function call fairly easily.
Python 3.3.0 (v3.3.0:bd8afb90ebf2, Sep 29 2012, 01:25:11)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> class Thing:
... def method(self):
... print(__class__)
...
>>> x = Thing.method.__closure__[0]
>>> dir(x)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: object does not provide __dir__
>>> type(x).__dir__(x)
['__gt__', '__eq__', '__setattr__', '__doc__', '__sizeof__', '__str__', '__init__', '__repr__', 'cell_contents', '__dir__', '__ge__', '__class__', '__new__', '__ne__', '__subclasshook__', '__hash__', '__lt__', '__reduce__', '__le__', '__getattribute__', '__format__', '__reduce_ex__', '__delattr__']
>>> 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']
>>> |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2012年10月17日 19:05:10 | christopherthemagnificent | set | recipients:
+ christopherthemagnificent |
| 2012年10月17日 19:05:10 | christopherthemagnificent | set | messageid: <1350500710.5.0.876584221442.issue16268@psf.upfronthosting.co.za> |
| 2012年10月17日 19:05:10 | christopherthemagnificent | link | issue16268 messages |
| 2012年10月17日 19:05:10 | christopherthemagnificent | create |
|