Mark Dickinson <dicki...@gmail.com> added the comment:

The backport wasn't as straightforward as I'd hoped, and we've pretty much run 
out of time for 2.7.

One issue is that long.from_bytes(b, ...) converts b to bytes type using the 
equivalent of "bytes(b)".  This doesn't work well in 2.7 (consider "bytes([255, 
0, 0])" for example.  So different code is needed in 2.7 when interpreting an 
arbitrary Python object as a sequence of bytes.

Perhaps the 2.7 version could just iterate over the given object, and raise an 
exception if any of the iterates are not integers in the range [0, 256).

----------

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

Reply via email to