From 7b2aa2e87c524f165f7664fbe473d0be10af8c7a Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Sat, 8 Oct 2016 20:12:54 -0700 Subject: [PATCH] Adjust ClassVar example to use pre-PEP-526 syntax. (Issue #28388) --- Doc/library/typing.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Doc/library/typing.rst b/Doc/library/typing.rst index 8b4eec3eab5..898a0f01e1d 100644 --- a/Doc/library/typing.rst +++ b/Doc/library/typing.rst @@ -845,8 +845,8 @@ The module defines the following classes, functions and decorators: and should not be set on instances of that class. Usage:: class Starship: - stats: ClassVar[Dict[str, int]] = {} # class variable - damage: int = 10 # instance variable + stats = {} # type: ClassVar[Dict[str, int]] # class variable + damage = 10 # type: int # instance variable :data:`ClassVar` accepts only types and cannot be further subscribed.