From 21d67ca9d544de8e1e1257360de5f29d59a848e2 Mon Sep 17 00:00:00 2001 From: AurelienNober Date: Sat, 15 Jun 2024 06:15:20 +0200 Subject: [PATCH] doc fix: generator should yield int, not None (#1776) --- docs/spec/annotations.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/spec/annotations.rst b/docs/spec/annotations.rst index 0b0ce6416..ce675a1f5 100644 --- a/docs/spec/annotations.rst +++ b/docs/spec/annotations.rst @@ -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'