◐ Shell
clean mode source ↗

Message 128877 - Python tracker

Because (arguably) we don't want to be able to pack non-integral floats (or Decimal instances, or ...) using integer formats:

>>> import struct
[56090 refs]
>>> struct.pack('L', 2.3)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
struct.error: required argument is not an integer
[56125 refs]