]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-44640: Improve punctuation consistency in isinstance/issubclass error messages...
authorwyz23x2 <52805709+wyz23x2@users.noreply.github.com>
Fri, 17 Sep 2021 23:10:17 +0000 (07:10 +0800)
committerGitHub <noreply@github.com>
Fri, 17 Sep 2021 23:10:17 +0000 (01:10 +0200)
Co-authored-by: Ɓukasz Langa <lukasz@langa.pl>
Objects/abstract.c

index 33eb8577a9be8d7360c7c56fe57330236122c9dd..c056c6698850c9ac0dcfdd31f90d94f9db8dcb71 100644 (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;
     }