From 11f6c3cf787dd0d26aa517475dacb441bf895884 Mon Sep 17 00:00:00 2001 From: rodrigodesalvobraz Date: Sat, 2 Dec 2023 00:43:40 -0800 Subject: [PATCH] Fix error in "Type[] and class objects vs protocols" section in pep-0544.rst a: ProtoB = C should be a: Type[ProtoB] = C because C is a subtype of ProtoB --- peps/pep-0544.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/peps/pep-0544.rst b/peps/pep-0544.rst index 04df7bd7fe6..a1b80737b57 100644 --- a/peps/pep-0544.rst +++ b/peps/pep-0544.rst @@ -782,8 +782,8 @@ For example:: class C: def meth(self, x: int) -> int: ... - a: ProtoA = C # Type check error, signatures don't match! - b: ProtoB = C # OK + a: Type[ProtoA] = C # Type check error, signatures don't match! + b: Type[ProtoB] = C # OK ``NewType()`` and type aliases