bpo-44640: Improve punctuation consistency in isinstance/issubclass error messages (GH-27144) (GH-28436)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit f4813388b4)

Co-authored-by: wyz23x2 <52805709+wyz23x2@users.noreply.github.com>

Co-authored-by: wyz23x2 <52805709+wyz23x2@users.noreply.github.com>
This commit is contained in:
Miss Islington (bot) 2021-09-19 12:11:41 -07:00 committed by GitHub
parent 753f7af22e
commit 9c23a1ebad
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2608,7 +2608,7 @@ object_isinstance(PyObject *inst, PyObject *cls)
}
else {
if (!check_class(cls,
"isinstance() arg 2 must be a type, a tuple of types or a union"))
"isinstance() arg 2 must be a type, a tuple of types, or a union"))
return -1;
retval = _PyObject_LookupAttrId(inst, &PyId___class__, &icls);
if (icls != NULL) {
@ -2704,7 +2704,7 @@ recursive_issubclass(PyObject *derived, PyObject *cls)
if (!_PyUnion_Check(cls) && !check_class(cls,
"issubclass() arg 2 must be a class,"
" a tuple of classes, or a union.")) {
" a tuple of classes, or a union")) {
return -1;
}