Skip to content

Commit

Permalink
doc fix: generator should yield int, not None (#1776)
Browse files Browse the repository at this point in the history
  • Loading branch information
AurelienNober authored Jun 15, 2024
1 parent ab3e82d commit 21d67ca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/spec/annotations.rst
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ the generic type ``Generator[yield_type, send_type,
return_type]`` provided by ``typing.py`` module::

def echo_round() -> Generator[int, float, str]:
res = yield
res = yield 0
while res:
res = yield round(res)
return 'OK'
Expand Down

0 comments on commit 21d67ca

Please sign in to comment.