◐ Shell
clean mode source ↗

Message 188476 - Python tracker

New version of my patch taking Serhiy's remarks into account:

 - add a check_format() function to cleanup unit tests
 - only call _PyUnicodeWriter_Prepare() once per formatted argument: compute the length and maximum character. Be more optimistic about sprintf() for integer and pointer: expect that the maximum character is 127 or less
 - uniformize code parsing width and precision
 - factorize code for '%s' and '%V'

Note: remove also _PyUnicode_WriteSubstring() from the patch, it was already added.