Message98173
('%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. |
|
Date |
User |
Action |
Args |
2010-01-23 00:46:35 | vstinner | set | recipients:
+ vstinner, doerwalter, eric.smith, ezio.melotti |
2010-01-23 00:46:35 | vstinner | set | messageid: <1264207595.48.0.194897709856.issue7267@psf.upfronthosting.co.za> |
2010-01-23 00:46:34 | vstinner | link | issue7267 messages |
2010-01-23 00:46:33 | vstinner | create | |
|