[issue5198] Strange DeprecationWarning behaviour in module struct

Ilya Sandler report at bugs.python.org
Thu Mar 5 00:01:56 CET 2009


Ilya Sandler <isandler at users.sourceforge.net> added the comment:

Here is another case, which I think is even worse.

Range checks are done inconsistently as well:

.../trunk> ./python -c 'import struct; struct.pack("B", 257)

'Traceback (most recent call last):
  File "<string>", line 1, in <module>
struct.error: ubyte format requires 0 <= number <= 255

.../trunk> ./python -c 'import struct; struct.pack(">B", 257)' 
sys:1: DeprecationWarning: 'B' format requires 0 <= number <= 255

----------
nosy: +isandler

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue5198>
_______________________________________


More information about the Python-bugs-list mailing list