This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients Sean.Ochoa, eric.smith, ezio.melotti, lekma, lemburg, mark.dickinson, petri.lehtinen, python-dev, ron_adam, serhiy.storchaka, vstinner, ysj.ray
Date 2013-05-05.23:03:09
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1367794989.72.0.386630166038.issue7330@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2013-05-05 23:03:09vstinnersetrecipients: + vstinner, lemburg, mark.dickinson, eric.smith, ron_adam, ezio.melotti, lekma, ysj.ray, python-dev, petri.lehtinen, serhiy.storchaka, Sean.Ochoa
2013-05-05 23:03:09vstinnersetmessageid: <1367794989.72.0.386630166038.issue7330@psf.upfronthosting.co.za>
2013-05-05 23:03:09vstinnerlinkissue7330 messages
2013-05-05 23:03:09vstinnercreate