[Python-Dev] cpython: PyUnicode_Join() checks output length in debug mode

Victor Stinner victor.stinner at haypocalc.com
Wed Oct 5 00:31:27 CEST 2011


Le 04/10/2011 23:41, Georg Brandl a écrit :
> I don't understand this change. Why would you not always add "copied" once you
> already have it? It seems to be the more correct version anyway.

If you use copied instead of seplen/itemlen, you suppose that the string 
has been overallocated in some cases, and that you have to resize the 
string (in-place or, more probably, with a copy).

Victor


More information about the Python-Dev mailing list