Message170076
| Author |
eric.snow |
| Recipients |
Albert.Zeyer, eric.snow |
| Date |
2012年09月09日.03:04:16 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1347159858.1.0.205137504837.issue15885@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
In Python 2 the code example generates an old-style class. When I tried it with a new style class, it worked fine:
class Wrapper(object):
@staticmethod
def __getattr__(item):
return repr(item) # dummy
a = Wrapper()
print(a.foo)
# 'foo'
Chalk this up to another reason to move to Python 3. <wink> |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2012年09月09日 03:04:19 | eric.snow | set | recipients:
+ eric.snow, Albert.Zeyer |
| 2012年09月09日 03:04:18 | eric.snow | set | messageid: <1347159858.1.0.205137504837.issue15885@psf.upfronthosting.co.za> |
| 2012年09月09日 03:04:17 | eric.snow | link | issue15885 messages |
| 2012年09月09日 03:04:16 | eric.snow | create |
|