[issue1023290] Conversion of longs to bytes and vice-versa.

Antoine Pitrou report at bugs.python.org
Mon Aug 17 23:02:06 CEST 2009


Antoine Pitrou <pitrou at free.fr> added the comment:

Alexandre:

> Notable changes are:
> 
>   - The name of the methods have been changed to int.tobytes() and
>     int.frombytes().

Without wanting to bikeshed, I think these methods should take
underscores as other int methods already do. This kind of
inconsistencies is really annoying (have you ever used PHP? :-)).

Martin:

> Before this gets applied, a (preferably final) decision should be made
> whether it should be provided for 2.7 as well. Personally, it would be
> fine with me either way.

I'm also fine with adding it to 2.7 as well. But someone has to provide
a patch (2.7 still has both `int` and `long`, which will make the task a
bit more involved than a straight backport).

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue1023290>
_______________________________________


More information about the Python-bugs-list mailing list