Skip to content

Commit 52454c5

Browse files
ChVeenterryjreedytomasr8
authored
gh-132527: Added missing w typecode to array() error message (#132529)
Co-authored-by: Terry Jan Reedy <[email protected]> Co-authored-by: Tomas R. <[email protected]>
1 parent eb2e430 commit 52454c5

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Include the valid typecode 'w' in the error message when an invalid typecode is passed to :class:`array.array`.

Modules/arraymodule.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -2873,7 +2873,7 @@ array_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
28732873
}
28742874
}
28752875
PyErr_SetString(PyExc_ValueError,
2876-
"bad typecode (must be b, B, u, h, H, i, I, l, L, q, Q, f or d)");
2876+
"bad typecode (must be b, B, u, w, h, H, i, I, l, L, q, Q, f or d)");
28772877
return NULL;
28782878
}
28792879

0 commit comments

Comments
 (0)