[Python-Dev] PEP 461 updates

Glenn Linderman v+python at g.nevcal.com
Thu Jan 16 03:12:04 CET 2014

On 1/15/2014 4:13 PM, Ethan Furman wrote:
>   - no value generated errors 
> %c will insert a single byte, either from an int in range(256), or from
> a bytes argument of length 1. 

what does

x = 354
b"%c" % x

produce?  Seems that construct produces a value dependent error in both 
python 2 & 3 (although it takes a much bigger value to produce the error 
in python 3, with str %... with bytes %, the problem with be reached at 
256, just like python 2).

Is this an intended exception to the overriding principle?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20140115/36c17635/attachment.html>

More information about the Python-Dev mailing list