Skip to content

Commit 77cc3a7

Browse files
authored
Fixed two small typos in Enums chapter that I discovered when writing… (#1762)
Fixed two small typos in Enums chapter that I discovered when writing conformance tests. 1. A syntax error in a couple of code samples 2. A formatting error that causes a code sample to be rendered incorrectly These changes don't impact the meaning of the spec.
1 parent 0a47e56 commit 77cc3a7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/spec/enums.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ its various forms) is optional::
3131
Color4 = Enum('Color4', ('RED', 'GREEN', 'BLUE')) # Optional
3232
Color5 = Enum('Color5', 'RED, GREEN, BLUE') # Optional
3333
Color6 = Enum('Color6', 'RED GREEN BLUE') # Optional
34-
Color7 = Enum('Color7', [('RED': 1), ('GREEN': 2), ('BLUE': 3)]) # Optional
35-
Color8 = Enum('Color8', (('RED': 1), ('GREEN': 2), ('BLUE': 3))) # Optional
34+
Color7 = Enum('Color7', [('RED', 1), ('GREEN', 2), ('BLUE', 3)]) # Optional
35+
Color8 = Enum('Color8', (('RED', 1), ('GREEN', 2), ('BLUE', 3))) # Optional
3636
Color9 = Enum('Color9', {'RED': 1, 'GREEN': 2, 'BLUE': 3}) # Optional
3737

3838
Enum classes can also be defined using a subclass of ``enum.Enum`` or any class
@@ -188,7 +188,7 @@ statically in cases where dynamic values are used.
188188
reveal_type(Example.c) # Revealed type is Literal[Example.c]
189189

190190
* An attribute with a private name (beginning with, but not ending in, a double
191-
underscore) is treated as a non-member.
191+
underscore) is treated as a non-member::
192192

193193
class Example(Enum):
194194
A = 1 # Member attribute

0 commit comments

Comments
 (0)