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 llllllllll
Recipients Claudiu.Popa, belopolsky, christian.heimes, eric.snow, ethan.furman, ionelmc, jedwards, llllllllll, r.david.murray, steven.daprano, terry.reedy
Date 2015-04-19.19:36:33
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1429472193.96.0.819314098402.issue23990@psf.upfronthosting.co.za>
In-reply-to
Content
This is a different case from raising an AttributeError inside the __call__;


>>> class C(object):
...     def __call__(self):
...         raise AttributeError()
...
>>> hasattr(C(), '__call__')
True
>>> class D(object):
...     @property
...     def __call__(self):
...         raise AttributeError()
...
>>> hasattr(C(), '__call__')
False

AttributeError was picked very intentionally for the example.

The docs show that n(args) == n.__call__(args) if n has a __call__; however, if a property raises an AttributeError, then it really does not have a __call__.
History
Date User Action Args
2015-04-19 19:36:34llllllllllsetrecipients: + llllllllll, terry.reedy, belopolsky, christian.heimes, ionelmc, steven.daprano, r.david.murray, Claudiu.Popa, ethan.furman, eric.snow, jedwards
2015-04-19 19:36:33llllllllllsetmessageid: <1429472193.96.0.819314098402.issue23990@psf.upfronthosting.co.za>
2015-04-19 19:36:33lllllllllllinkissue23990 messages
2015-04-19 19:36:33llllllllllcreate