Skip to content

Commit 3ff35ba

Browse files
miss-islingtonChVeenterryjreedytomasr8
authored
[3.13] gh-132527: Added missing w typecode to array() error message (GH-132529) (#132938)
Co-authored-by: Christian Veenhuis <124370897+ChVeen@users.noreply.github.com> Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu> Co-authored-by: Tomas R. <tomas.roun8@gmail.com>
1 parent 7684055 commit 3ff35ba

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed
Lines changed: 1 addition & 0 deletions
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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2840,7 +2840,7 @@ array_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
28402840
}
28412841
}
28422842
PyErr_SetString(PyExc_ValueError,
2843-
"bad typecode (must be b, B, u, h, H, i, I, l, L, q, Q, f or d)");
2843+
"bad typecode (must be b, B, u, w, h, H, i, I, l, L, q, Q, f or d)");
28442844
return NULL;
28452845
}
28462846

0 commit comments

Comments
 (0)