Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
gh-132527: Added missing w typecode to array() error message (GH-13…
…2529)

(cherry picked from commit 52454c5)

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>
  • Loading branch information
3 people authored and miss-islington committed Apr 25, 2025
commit ebc8655982aee94697d416ff7c8606d1c4c9f3fd
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Include the valid typecode 'w' in the error message when an invalid typecode is passed to :class:`array.array`.
2 changes: 1 addition & 1 deletion Modules/arraymodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -2840,7 +2840,7 @@ array_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
}
}
PyErr_SetString(PyExc_ValueError,
"bad typecode (must be b, B, u, h, H, i, I, l, L, q, Q, f or d)");
"bad typecode (must be b, B, u, w, h, H, i, I, l, L, q, Q, f or d)");
return NULL;
}

Expand Down
Loading