[issue5463] Remove deprecated features from struct module
Mark Dickinson
report at bugs.python.org
Sun Apr 19 17:30:20 CEST 2009
Mark Dickinson <dickinsm at gmail.com> added the comment:
Hmm. In 3.0 and 2.7, I get:
>>> from struct import pack
>>> pack('L', 123.0)
sys:1: DeprecationWarning: integer argument expected, got float
b'{\x00\x00\x00'
So it looks like we already changed py3k to get rid of the
DeprecationWarning.
I think the idea was that eventually *only* integers would be accepted
for the integer format codes. So pack('L', 123.0) should ideally raise
TypeError. If we're not going to do that, we should at least put the
DeprecationWarning back in, but it seems better to actually go ahead
with the deprecation.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue5463>
_______________________________________
More information about the Python-bugs-list
mailing list