[Python-checkins] gh-104328: Fix typo in ``typing.Generic`` multiple inheritance error message (#104335)

carljm webhook-mailer at python.org
Tue May 9 15:18:48 EDT 2023


https://github.com/python/cpython/commit/01c321ca34d99f35f174768c6f8c500801d4ef4c
commit: 01c321ca34d99f35f174768c6f8c500801d4ef4c
branch: main
author: Kirill Podoprigora <kirill.bast9 at mail.ru>
committer: carljm <carl at oddbird.net>
date: 2023-05-09T13:18:15-06:00
summary:

gh-104328: Fix typo in ``typing.Generic`` multiple inheritance error message (#104335)

files:
M Lib/typing.py

diff --git a/Lib/typing.py b/Lib/typing.py
index 0dacdd9031a7..4f8cba88632d 100644
--- a/Lib/typing.py
+++ b/Lib/typing.py
@@ -1896,7 +1896,7 @@ def __init_subclass__(cls, *args, **kwargs):
                         base.__origin__ is Generic):
                     if gvars is not None:
                         raise TypeError(
-                            "Cannot inherit from Generic[...] multiple types.")
+                            "Cannot inherit from Generic[...] multiple times.")
                     gvars = base.__parameters__
             if gvars is not None:
                 tvarset = set(tvars)



More information about the Python-checkins mailing list