Louie Lu added the comment: Adding PyErr_SetString and PyErr_Format wrapper, with a global offset variable to handle this.
struct.pack('!h', 0x8FFFF) Traceback (most recent call last): File "tests.py", line 5, in <module> struct.pack('!h', 0x8FFFF) struct.error: Raise at offset 1, 'h' format requires -32768 <= number <= 32767 ---------- nosy: +louielu _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue23578> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com