[Python-Dev] PyUnicode_EncodeDecimal

Victor Stinner victor.stinner at haypocalc.com
Tue Nov 22 13:28:12 CET 2011


Le mardi 22 novembre 2011 02:02:05, Victor Stinner a écrit :
> This function is broken by design if an error handler is specified: the
> caller cannot know the size of the output buffer, whereas the caller has
> to allocate this buffer.
> 
> I propose to raise an error if an error handler (different than "strict")
> is specified) and do this change in Python 2.7, 3.2 and 3.3.
> 
> In Python 2.7 code base, PyUnicode_EncodeDecimal() is always called with
> errors=NULL. In Python 3.x, the function is no more called.

I opened the following issue for this point:
http://bugs.python.org/issue13452

Victor


More information about the Python-Dev mailing list