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 scoder
Recipients pitrou, scoder, serhiy.storchaka
Date 2017-09-18.07:19:36
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1505719177.32.0.594595962659.issue31465@psf.upfronthosting.co.za>
In-reply-to
Content
Question: Do you think it's ok to change the signature of _PyType_Lookup() in this way by adding an error flag, or should I add a new function instead?

There is no performance difference to PR 3279 since gcc should optimise this flag properly away in most cases, so it's not a question about performance but about backwards compatibility. It's an internal, private function, which suggests that it should be ok, but it's not my decision. Cython calls it in a couple of cases, which I will obviously adapt in the next release, if the signature change is accepted.

Should the "no MRO after readying" error case be kept? It's the only non-exception error case, setting the error flag to 1. It seems ok to ignore this case, so it's not really an error, somehow. I would change it to return 0 (instead of 1), and thus change the error flag to simply "-1 on error (with exception set), 0 on success". Opinions?
History
Date User Action Args
2017-09-18 07:19:37scodersetrecipients: + scoder, pitrou, serhiy.storchaka
2017-09-18 07:19:37scodersetmessageid: <1505719177.32.0.594595962659.issue31465@psf.upfronthosting.co.za>
2017-09-18 07:19:37scoderlinkissue31465 messages
2017-09-18 07:19:36scodercreate