Skip to content

Commit 243393d

Browse files
committed
Correctly mark the error case in example of protocol implementation for class object
1 parent 6112382 commit 243393d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/spec/protocol.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -509,8 +509,8 @@ For example::
509509
class C:
510510
def meth(self, x: int) -> int: ...
511511

512-
a: ProtoA = C # Type check error, signatures don't match!
513-
b: ProtoB = C # OK
512+
a: ProtoA = C() # OK
513+
b: ProtoB = C() # Error: signatures don't match
514514

515515
.. _`protocol-newtype-aliases`:
516516

0 commit comments

Comments
 (0)