[issue7330] PyUnicode_FromFormat: implement width and precision for %s, %S, %R, %V, %U, %A

STINNER Victor report at bugs.python.org
Mon Mar 21 14:37:13 CET 2011

STINNER Victor <victor.stinner at haypocalc.com> added the comment:

Ray Allen: Your patch doesn't touch the documentation. At least, you should mention (using .. versionchanged:: 3.3) that PyUnicode_FromFormat() does now support width and precision. It is important to specify the unit of the sizes: number of bytes or number of characters? Because many developer may refer to printf() which counts in bytes (especially for %s). PyUnicode_FromFormat() is more close to wprintf(), but I don't know if wprintf() uses bytes or characters for width and precision with the %s and %ls formats.

I plan to fix #10833 by replacing %.100s by %s is most (or all) error messages, and then commit your patch.


Python tracker <report at bugs.python.org>

More information about the Python-bugs-list mailing list