Skip to content

Commit 21d67ca

Browse files
doc fix: generator should yield int, not None (#1776)
1 parent ab3e82d commit 21d67ca

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/spec/annotations.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ the generic type ``Generator[yield_type, send_type,
310310
return_type]`` provided by ``typing.py`` module::
311311

312312
def echo_round() -> Generator[int, float, str]:
313-
res = yield
313+
res = yield 0
314314
while res:
315315
res = yield round(res)
316316
return 'OK'

0 commit comments

Comments
 (0)