[Python-checkins] bpo-46104: Fix example broken by GH-30148 (GH-30203)

Fidget-Spinner webhook-mailer at python.org
Sun Dec 19 23:48:52 EST 2021


https://github.com/python/cpython/commit/7c5c3f7254d78babcaf7a2ec187fd6ec53b8403c
commit: 7c5c3f7254d78babcaf7a2ec187fd6ec53b8403c
branch: main
author: Alex Waygood <Alex.Waygood at Gmail.com>
committer: Fidget-Spinner <28750310+Fidget-Spinner at users.noreply.github.com>
date: 2021-12-20T12:48:35+08:00
summary:

bpo-46104: Fix example broken by GH-30148 (GH-30203)

See discussion in GH-30179.

files:
M Doc/library/typing.rst

diff --git a/Doc/library/typing.rst b/Doc/library/typing.rst
index ec1b8d1a5ebcc..727941b57b547 100644
--- a/Doc/library/typing.rst
+++ b/Doc/library/typing.rst
@@ -432,7 +432,7 @@ value of type :data:`Any` and assign it to any variable::
    a = []          # OK
    a = 2           # OK
 
-   s = ''          # Inferred type of 's' is str
+   s: str = ''
    s = a           # OK
 
    def foo(item: Any) -> int:



More information about the Python-checkins mailing list