Martin Panter added the comment:

I agree that the signed conversion cases should be an error.

However the unsigned case would break working code that I have written for 
bijective numeration. See _bytes_to_int() and _int_to_bytes() in Issue 20132, 
inc-codecs.diff, for example. Since non-zero unsigned conversions work by 
converting

N bytes  <->  0 <= value < 2^N

For N = 0, there is only one possible value, 0.

----------
nosy: +martin.panter

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue27623>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to