STINNER Victor added the comment: 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. ---------- Added file: http://bugs.python.org/file30144/unicode_fromformat_precision-3.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue7330> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com