Bug report
Bug description:
This issue is suitable for a first-time contributor.
The 'w' typecode is supported but the error message does not mention it:
>>> array('x')
Traceback (most recent call last):
File "<python-input-5>", line 1, in <module>
array('x')
~~~~~^^^^^
ValueError: bad typecode (must be b, B, u, h, H, i, I, l, L, q, Q, f or d)
We should add 'w' to the list. This is the relevant part of the code that should be updated:
|
PyErr_SetString(PyExc_ValueError, |
|
"bad typecode (must be b, B, u, h, H, i, I, l, L, q, Q, f or d)"); |
|
return NULL; |
Happy to help if you have any questions!
CPython versions tested on:
CPython main branch
Operating systems tested on:
Linux
Linked PRs
Bug report
Bug description:
This issue is suitable for a first-time contributor.
The
'w'typecode is supported but the error message does not mention it:We should add
'w'to the list. This is the relevant part of the code that should be updated:cpython/Modules/arraymodule.c
Lines 2875 to 2877 in 6163841
Happy to help if you have any questions!
CPython versions tested on:
CPython main branch
Operating systems tested on:
Linux
Linked PRs
wtypecode to array() error message #132529wtypecode to array() error message (GH-132529) #132938