[issue14897] struct.pack raises unexpected error message
Mark Dickinson
report at bugs.python.org
Thu May 24 10:22:22 CEST 2012
Mark Dickinson <dickinsm at gmail.com> added the comment:
Hmm. Yes, that's not very clear. The same message is used both for struct.pack and for Struct.pack (which struct.pack is really just a convenient alias for); it makes a bit more sense for the latter:
>>> struct.Struct('1s1s').pack('33')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
struct.error: pack requires exactly 2 arguments
----------
nosy: +mark.dickinson
versions: +Python 3.3
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue14897>
_______________________________________
More information about the Python-bugs-list
mailing list