]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.9] bpo-46104: Fix example broken by GH-30148 (GH-30203) (GH-30210)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Mon, 20 Dec 2021 06:02:04 +0000 (22:02 -0800)
committerGitHub <noreply@github.com>
Mon, 20 Dec 2021 06:02:04 +0000 (22:02 -0800)
See discussion in GH-30179.
(cherry picked from commit 7c5c3f7254d78babcaf7a2ec187fd6ec53b8403c)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Automerge-Triggered-By: GH:Fidget-Spinner
Doc/library/typing.rst

index 34aaa1fac3077b2fa36d4ef9f4a57a12c70002cd..2da544884db1dac9e03e7bf1d0f31558f43f2141 100644 (file)
@@ -362,7 +362,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: