Skip to content

Commit e19e490

Browse files
committed
clarify callback protocol example
1 parent 11d4fb2 commit e19e490

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

docs/source/protocols.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -490,6 +490,7 @@ a double underscore prefix is used. For example:
490490
491491
copy_a: Callable[[T], T]
492492
copy_b: Copy
493+
copy_c: Callable[[T], T]
493494
494495
copy_a = copy_b # OK
495-
copy_b = copy_a # Also OK
496+
copy_b = copy_c # OK, but would fail without the double underscore prefix

0 commit comments

Comments
 (0)