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 eryksun
Recipients Claudiu.Popa, belopolsky, christian.heimes, eric.snow, eryksun, ethan.furman, ionelmc, jedwards, llllllllll, r.david.murray, rhettinger, steven.daprano, terry.reedy
Date 2015-04-20.15:50:47
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
To be consistent you'd have to do the attribute check in PyObject_Call as well, i.e. if an object isn't callable, then trying to call it should raise a TypeError. I think the cost can be mitigated by only checking heap types (i.e. tp_flags & Py_TPFLAGS_HEAPTYPE).

It would be cleaner if slot_tp_call failed by raising TypeError instead of letting the AttributeError bubble up. There's a precedent in slot_tp_iter to raise a TypeError if lookup_method() fails. This would avoid having to change PyObject_Call.
Date User Action Args
2015-04-20 15:50:47eryksunsetrecipients: + eryksun, rhettinger, terry.reedy, belopolsky, christian.heimes, ionelmc, steven.daprano, r.david.murray, Claudiu.Popa, ethan.furman, eric.snow, llllllllll, jedwards
2015-04-20 15:50:47eryksunsetmessageid: <>
2015-04-20 15:50:47eryksunlinkissue23990 messages
2015-04-20 15:50:47eryksuncreate