[ python-Bugs-1530559 ] struct.pack raises TypeError where it used to convert
SourceForge.net
noreply at sourceforge.net
Fri Jul 28 20:07:05 CEST 2006
Bugs item #1530559, was opened at 2006-07-28 18:07
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1530559&group_id=5470
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Library
Group: Python 2.5
Status: Open
Resolution: None
Priority: 5
Submitted By: Joe Wreschnig (piman)
Assigned to: Nobody/Anonymous (nobody)
Summary: struct.pack raises TypeError where it used to convert
Initial Comment:
piman at toybox:~$ python2.4 -c "import struct;
struct.pack('>H', 1.0)"
piman at toybox:~$ python2.5 -c "import struct;
struct.pack('>H', 1.0)"
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/lib/python2.5/struct.py", line 63, in pack
return o.pack(*args)
TypeError: unsupported operand type(s) for &: 'float'
and 'long'
This might have appeared as part of the struct
optimizations; if struct isn't going to convert anymore
for performance reasons, I think this should be
mentioned in the release notes. Though personally I
would prefer struct go back to converting its arguments.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1530559&group_id=5470
More information about the Python-bugs-list
mailing list