Serhiy Storchaka added the comment:

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.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue28295>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to