Message241665
| 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 | <1429545047.44.0.932396647375.issue23990@psf.upfronthosting.co.za> |
| In-reply-to |
| Content | |
|---|---|
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. |
|
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2015-04-20 15:50:47 | eryksun | set | recipients: + 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:47 | eryksun | set | messageid: <1429545047.44.0.932396647375.issue23990@psf.upfronthosting.co.za> |
| 2015-04-20 15:50:47 | eryksun | link | issue23990 messages |
| 2015-04-20 15:50:47 | eryksun | create | |