Alexandre Vassalotti <[email protected]> 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 <[email protected]>
<http://bugs.python.org/issue1023290>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com