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 serhiy.storchaka
Recipients serhiy.storchaka, vstinner, xiang.zhang
Date 2016-10-02.17:39:02
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1475429942.9.0.212101722993.issue28295@psf.upfronthosting.co.za>
In-reply-to
Content
The remaining question is what should be the type of the exception. ValueError is documented exception, but SystemError is actually raised exception (and it always was raised). PyUnicode_AsUCS4() is used 6 times in 3 files in CPython code, and it should never raise this exception. PyUnicode_AsUCS4() is in public API an can be used in third party code. Seems raising this exception can be caused only by programming error in C extension. SystemError is right exception in this case.

It looks to me that the code is correct and the documentation should be fixed to match the code.
History
Date User Action Args
2016-10-02 17:39:02serhiy.storchakasetrecipients: + serhiy.storchaka, vstinner, xiang.zhang
2016-10-02 17:39:02serhiy.storchakasetmessageid: <1475429942.9.0.212101722993.issue28295@psf.upfronthosting.co.za>
2016-10-02 17:39:02serhiy.storchakalinkissue28295 messages
2016-10-02 17:39:02serhiy.storchakacreate