Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.7k
Closed
Description
Bug report
Bug description:
This issue is suitable for a first-time contributor.
The'w' typecode issupported but the error message does not mention it:
>>>array('x')Traceback (mostrecentcalllast):File"<python-input-5>",line1,in<module>array('x')~~~~~^^^^^ValueError:badtypecode (mustbeb,B,u,h,H,i,I,l,L,q,Q,ford)
We should add'w' to the list. This is the relevant part of the code that should be updated:
Lines 2875 to 2877 in6163841
| PyErr_SetString(PyExc_ValueError, | |
| "bad typecode (must be b, B, u, h, H, i, I, l, L, q, Q, f or d)"); | |
| returnNULL; |
Happy to help if you have any questions!
CPython versions tested on:
CPython main branch
Operating systems tested on:
Linux