Skip to content

Commit 39c4fe5

Browse files
miss-islingtonwyz23x2
authored andcommitted
bpo-44640: Improve punctuation consistency in isinstance/issubclass error messages (GH-27144) (GH-28436)
Co-authored-by: Łukasz Langa <[email protected]> (cherry picked from commit f481338) Co-authored-by: wyz23x2 <[email protected]> Co-authored-by: wyz23x2 <[email protected]>
1 parent d08e4a8 commit 39c4fe5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Objects/abstract.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2608,7 +2608,7 @@ object_isinstance(PyObject *inst, PyObject *cls)
26082608
}
26092609
else {
26102610
if (!check_class(cls,
2611-
"isinstance() arg 2 must be a type, a tuple of types or a union"))
2611+
"isinstance() arg 2 must be a type, a tuple of types, or a union"))
26122612
return -1;
26132613
retval = _PyObject_LookupAttrId(inst, &PyId___class__, &icls);
26142614
if (icls != NULL) {
@@ -2704,7 +2704,7 @@ recursive_issubclass(PyObject *derived, PyObject *cls)
27042704

27052705
if (!_PyUnion_Check(cls) && !check_class(cls,
27062706
"issubclass() arg 2 must be a class,"
2707-
" a tuple of classes, or a union.")) {
2707+
" a tuple of classes, or a union")) {
27082708
return -1;
27092709
}
27102710

0 commit comments

Comments
 (0)