Message170070
Code:
```
class Wrapper:
@staticmethod
def __getattr__(item):
return repr(item) # dummy
a = Wrapper()
print(a.foo)
```
Expected output: 'foo'
Actual output with Python 2.7:
Traceback (most recent call last):
File "test_staticmethodattr.py", line 7, in <module>
print(a.foo)
TypeError: 'staticmethod' object is not callable
Python 3.2 does return the expected ('foo').
PyPy returns the expected 'foo'. |
|
Date |
User |
Action |
Args |
2012-09-09 00:15:39 | Albert.Zeyer | set | recipients:
+ Albert.Zeyer |
2012-09-09 00:15:09 | Albert.Zeyer | set | messageid: <1347149709.6.0.110064908732.issue15885@psf.upfronthosting.co.za> |
2012-09-09 00:15:07 | Albert.Zeyer | link | issue15885 messages |
2012-09-09 00:14:55 | Albert.Zeyer | create | |
|