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 doerwalter, eric.smith, ezio.melotti, vstinner
Date 2010-01-23.00:46:33
SpamBayes Score 0.0092486795
Marked as misclassified No
Message-id <1264207595.48.0.194897709856.issue7267@psf.upfronthosting.co.za>
In-reply-to
Content
('%c' % 255) == chr(255) == '\xff'

'%c' % 256 raise an "OverflowError: unsigned byte integer is greater than maximum" and chr(256) raise a "ValueError: chr() arg not in range(256)". I prefer the second error ;-)

str.format() should follow the same behaviour.

str is a byte string: it can be used to create a network packet or encode data into a byte stream. '%c' is useful for that, and str.format() should keep this nice feature.
History
Date User Action Args
2010-01-23 00:46:35vstinnersetrecipients: + vstinner, doerwalter, eric.smith, ezio.melotti
2010-01-23 00:46:35vstinnersetmessageid: <1264207595.48.0.194897709856.issue7267@psf.upfronthosting.co.za>
2010-01-23 00:46:34vstinnerlinkissue7267 messages
2010-01-23 00:46:33vstinnercreate