This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Albert.Zeyer
Recipients Albert.Zeyer
Date 2012-09-09.00:14:55
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1347149709.6.0.110064908732.issue15885@psf.upfronthosting.co.za>
In-reply-to
Content
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'.
History
Date User Action Args
2012-09-09 00:15:39Albert.Zeyersetrecipients: + Albert.Zeyer
2012-09-09 00:15:09Albert.Zeyersetmessageid: <1347149709.6.0.110064908732.issue15885@psf.upfronthosting.co.za>
2012-09-09 00:15:07Albert.Zeyerlinkissue15885 messages
2012-09-09 00:14:55Albert.Zeyercreate