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

STINNER Victor report at bugs.python.org
Mon May 6 01:05:27 CEST 2013


STINNER Victor added the comment:

I didn't add the following optimization (proposed by Serhiy in his review) because I'm not convinced that it's faster, and it's unrelated to this issue:

   if (width > (PY_SSIZE_T_MAX - 9) / 10
       && width > (PY_SSIZE_T_MAX - ((int)*f - '0')) / 10)
   { ... }

instead of 

   if (width > (PY_SSIZE_T_MAX - ((int)*f - '0')) / 10)
   { ... }

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue7330>
_______________________________________


More information about the Python-bugs-list mailing list