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 vstinner
Recipients anthony shaw, vstinner
Date 2019-03-21.09:32:26
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1553160746.25.0.228401004637.issue36386@roundup.psfhosted.org>
In-reply-to
Content
> This is because PyUnicode_DecodeFSDefaultAndSize calls _PyInterpreterState_GET_UNSAFE(), which already documents the potential NULL return value. 

_PyInterpreterState_GET_UNSAFE() is preferred over other functions getting the interpreter for best performances. _PyInterpreterState_GET_UNSAFE() is the most efficient way to access the interpreter. That's why I was talking about the cost of additional checks (to detect API misuage) at runtime.

> Understood, happy for this to be closed. Aware that I was misusing the API :-)

I close the issue.
History
Date User Action Args
2019-03-21 09:32:26vstinnersetrecipients: + vstinner, anthony shaw
2019-03-21 09:32:26vstinnersetmessageid: <1553160746.25.0.228401004637.issue36386@roundup.psfhosted.org>
2019-03-21 09:32:26vstinnerlinkissue36386 messages
2019-03-21 09:32:26vstinnercreate