[Python-Dev] proposed struct module format code addition

Shane Holloway (IEEE) shane.holloway at ieee.org
Sun Oct 3 21:28:30 CEST 2004

Since "long" is supposed to be a full-fledged member of the python 
building blocks, I'm +1 for functions being added in both binascii and 

One of the greatest things I use struct is for is packing (and 
unpacking) the python building blocks for "external use" -- network, 
database, and (usually C) libraries.  I think it would be best if all 
the building blocks could be packed and unpacked from one module.

The additions to binascii would be more convenient to use of the two 
additions.  But truth to tell, I rarely use binascii.  I tend to prefer 
struct.pack with str.encode.

What do you think about adding long.tobytes()/long.frombytes() to go 
with the new bytes() type?  <wink>

-Shane Holloway

More information about the Python-Dev mailing list