]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-46104: Fix example broken by GH-30148 (GH-30203)
authorAlex Waygood <Alex.Waygood@Gmail.com>
Mon, 20 Dec 2021 04:48:35 +0000 (04:48 +0000)
committerGitHub <noreply@github.com>
Mon, 20 Dec 2021 04:48:35 +0000 (12:48 +0800)
See discussion in GH-30179.

Doc/library/typing.rst

index ec1b8d1a5ebcc99dadc0576f801968c4ee2f9122..727941b57b547b676740e846e9f32ee6ee752b08 100644 (file)
@@ -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: