[Python-Dev] Re: Last call for comments on PEP 573 (Module State Access from C Extension Methods)

2019年12月30日 05:06:59 -0800

On Wed, 4 Dec 2019 at 09:44, Nick Coghlan <[email protected]> wrote:
>
> I have a few minor copy-editing comments, but I'll submit those as a PR to 
> the PEPs repo (it's nothing substantial, just a few wording clarifications, 
> and making sure the list of added methods is complete).
Belatedly working on those copy-editing updates, I noticed one
semantic change I'd like to make to the PEP.
At the moment PyType_GetModule() and PyType_GetModuleState() are
specified as raising SystemError if they are passed:
* a non-type object
* a non-heap type
* a heap type without ht_module set
Raising TypeError would be more appropriate than raising SystemError,
since this is really a standard case of "you passed in an object of a
type the API wasn't expecting".
A PR with this change (and the previously mentioned copy-editing
updates) is up at https://github.com/python/peps/pull/1264
Cheers,
Nick.
-- 
Nick Coghlan | [email protected] | Brisbane, Australia
_______________________________________________
Python-Dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/[email protected]/message/HYUM3DZT6KM2O4SK2U2AY5AJAKABTEL5/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to