This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author xiang.zhang
Recipients andrewnester, louielu, serhiy.storchaka, xiang.zhang
Date 2017-05-03.07:20:40
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1493796040.21.0.423115670823.issue30245@psf.upfronthosting.co.za>
In-reply-to
Content
In #29649, struct.pack_into's error message was improved. But the message could be confusing encountering a large offset due to overflow:

>>> struct.pack_into('I', bytearray(10), sys.maxsize, 1)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
struct.error: pack_into requires a buffer of at least -9223372036854775805 bytes for packing 4 bytes at offset 9223372036854775807 (actual buffer size is 10)

BTW, really long the error message.
History
Date User Action Args
2017-05-03 07:20:40xiang.zhangsetrecipients: + xiang.zhang, serhiy.storchaka, andrewnester, louielu
2017-05-03 07:20:40xiang.zhangsetmessageid: <1493796040.21.0.423115670823.issue30245@psf.upfronthosting.co.za>
2017-05-03 07:20:40xiang.zhanglinkissue30245 messages
2017-05-03 07:20:40xiang.zhangcreate