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 ysj.ray
Recipients eric.smith, ezio.melotti, lemburg, mark.dickinson, ron_adam, ysj.ray
Date 2010-07-29.06:08:07
SpamBayes Score 9.925781e-05
Marked as misclassified No
Message-id <1280383689.41.0.797458494299.issue7330@psf.upfronthosting.co.za>
In-reply-to
Content
You can write "%20s" as a argument for PyUnicode_FromFormat(), but it has no effect. The width and precision modifiers are not intended to apply to string formating(%s, %S, %R, %A), only apply to integer(%d, %u,  %i, %x). Though you can write "%20s", but you cannot write "%20S", "%20R" and "%20A".


There can be several fixes:

1. make the presence of width and precision modifiers of %s, %S, %R, %A  raise an Exception, like ValueError, instead of segment fault.
2. make the presence of width and precision modifiers of %s, %S, %R, %A have no effect, just like current %s.
3. make the presence of width and precision modifiers of %s, %S, %R, %A do have correct effect, like %r and %s in string formatting in python code.


Thanks to Eric's ideas. Now I'm sure I prefer the last fix. I will work out a patch for this.
History
Date User Action Args
2010-07-29 06:08:09ysj.raysetrecipients: + ysj.ray, lemburg, mark.dickinson, eric.smith, ron_adam, ezio.melotti
2010-07-29 06:08:09ysj.raysetmessageid: <1280383689.41.0.797458494299.issue7330@psf.upfronthosting.co.za>
2010-07-29 06:08:07ysj.raylinkissue7330 messages
2010-07-29 06:08:07ysj.raycreate