[issue1023290] Conversion of longs to bytes and vice-versa.
Alexandre Vassalotti
report at bugs.python.org
Mon Aug 17 22:13:12 CEST 2009
Alexandre Vassalotti <alexandre at peadrop.com> added the comment:
Here's a new patch incorporating the suggestions I received on python-ideas.
Notable changes are:
- The name of the methods have been changed to int.tobytes() and
int.frombytes().
- The tri-state `little_endian' argument has been removed in favor
of the `byteorder' argument which takes either the string
'little' or 'big'.
- The `byteorder' argument has to be specified explicitly.
- The variable-length version of int.tobytes() has been removed.
- The `fixed_length' argument has been renamed to `length'.
- The `signed' argument is now keyword-only and now defaults to False.
----------
assignee: -> alexandre.vassalotti
components: +Interpreter Core
stage: -> patch review
title: proposed struct module format code addition -> Conversion of longs to bytes and vice-versa.
versions: +Python 3.2
Added file: http://bugs.python.org/file14739/long_and_bytes_conversion-2.diff
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue1023290>
_______________________________________
More information about the Python-bugs-list
mailing list