Author serhiy.storchaka
Recipients pitrou, serhiy.storchaka, vstinner
Date 2013-04-19.20:18:53
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
_PyBytesWriter and _PyUnicodeWriter have differen use cases. While _PyUnicodeWriter used primary in formatter where resulting size is rarely known and reallocation in decoders usually caused by widening result, _PyBytesWriter is used only in decoders where we usually can estimate a result size or it's upper bound. Resizing happened only in exceptional cases, when error handler called.

The patch contains a special case for writing only one bytes object. This is very unlikely case. It happened only when an encoded string contains only one illegal character. I think this case is not worth a complication and
obfuscation of the code. I think we should drop readonly attribute and a piece of the code (which looks buggy for me anyway).
Date User Action Args
2013-04-19 20:18:53serhiy.storchakasetrecipients: + serhiy.storchaka, pitrou, vstinner
2013-04-19 20:18:53serhiy.storchakasetmessageid: <>
2013-04-19 20:18:53serhiy.storchakalinkissue17742 messages
2013-04-19 20:18:53serhiy.storchakacreate