From 446f1a5ec1f7844db0c7df5dc004759b9a646ae8 Mon Sep 17 00:00:00 2001 From: Kiril Ivanov Date: Wed, 7 Oct 2026 16:21:20 +0300 Subject: [PATCH] Add versionadded for Generator defaults --- Doc/library/typing.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Doc/library/typing.rst b/Doc/library/typing.rst index c909b8bad6d726..040772efc9d2fc 100644 --- a/Doc/library/typing.rst +++ b/Doc/library/typing.rst @@ -473,6 +473,10 @@ The ``SendType`` and ``ReturnType`` parameters default to :const:`!None`:: yield start start += 1 +.. versionadded:: 3.13 + + Added default :const:`!None` for ``SendType`` and ``ReturnType`` + It is also possible to set these types explicitly:: def infinite_stream(start: int) -> Generator[int, None, None]: