[issue23578] struct.pack error messages do not indicate which argument was invalid

2022-03-23 Thread Irit Katriel
Change by Irit Katriel : -- versions: +Python 3.11 -Python 3.7 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue23578] struct.pack error messages do not indicate which argument was invalid

2017-02-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> serhiy.storchaka priority: normal -> low stage: needs patch -> patch review ___ Python tracker

[issue23578] struct.pack error messages do not indicate which argument was invalid

2017-02-25 Thread Louie Lu
Louie Lu added the comment: > 1. Using global variable doesn't look good to me. That's true, but I'm not sure if there have other methods to do this. If not using global variable, we will need to change a bunch of the function arguments. Since the arguments didn't contain the information about

[issue23578] struct.pack error messages do not indicate which argument was invalid

2017-02-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: 1. Using global variable doesn't look good to me. 2. "at offset 1" looks confusing to me. What is offset? Is this an offset of packed item in created bytes object? The you shouldn't get the odd number for the '!h' format. I think it would be better to

[issue23578] struct.pack error messages do not indicate which argument was invalid

2017-02-25 Thread Louie Lu
Louie Lu added the comment: Adding PyErr_SetString and PyErr_Format wrapper, with a global offset variable to handle this. struct.pack('!h', 0x8) Traceback (most recent call last): File "tests.py", line 5, in struct.pack('!h', 0x8) struct.error: Raise at offset 1, 'h' format

[issue23578] struct.pack error messages do not indicate which argument was invalid

2017-02-25 Thread Louie Lu
Changes by Louie Lu : -- pull_requests: +262 ___ Python tracker ___ ___ Python-bugs-list

[issue23578] struct.pack error messages do not indicate which argument was invalid

2016-10-08 Thread R. David Murray
Changes by R. David Murray : -- keywords: +easy (C) stage: -> needs patch versions: +Python 3.7 -Python 2.7, Python 3.4 ___ Python tracker

[issue23578] struct.pack error messages do not indicate which argument was invalid

2015-03-03 Thread Alistair Lynn
New submission from Alistair Lynn: In this example: struct.pack('!', 0x5FFF, 0x6FFF, 0x7FFF, 0x8FFF) Python errors that the 'h' format requires -32768 = number = 32767, but it does not indicate which of the arguments is at fault. In this contrived example it's clearly the fourth one,

[issue23578] struct.pack error messages do not indicate which argument was invalid

2015-03-03 Thread Ned Deily
Changes by Ned Deily n...@acm.org: -- nosy: +mark.dickinson, meador.inge ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23578 ___ ___