STINNER Victor <vstin...@redhat.com> added the comment:
> 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. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue36386> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com