Skip to content

Commit b878e44

Browse files
committed
fix use of ==/is in docs
1 parent afa086f commit b878e44

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,13 @@ Add properties to Python enumeration values with a simple declarative syntax. [E
3131
# the type hints on the Enum class become properties on
3232
# each value, matching the order in which they are specified
3333

34-
Color.RED.rgb is (1, 0, 0)
35-
Color.GREEN.rgb is (0, 1, 0)
36-
Color.BLUE.rgb is (0, 0, 1)
34+
Color.RED.rgb == (1, 0, 0)
35+
Color.GREEN.rgb == (0, 1, 0)
36+
Color.BLUE.rgb == (0, 0, 1)
3737

38-
Color.RED.hex is 'ff0000'
39-
Color.GREEN.hex is '00ff00'
40-
Color.BLUE.hex is '0000ff'
38+
Color.RED.hex == 'ff0000'
39+
Color.GREEN.hex == '00ff00'
40+
Color.BLUE.hex == '0000ff'
4141

4242
```
4343

doc/source/index.rst

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -55,16 +55,16 @@ Symmetric type annotations:
5555
# Enumeration instances may be instantiated from any Symmetric property
5656
# values. Use case_fold for case insensitive matching
5757
58-
Color((1, 0, 0)) == Color.RED
59-
Color((0, 1, 0)) == Color.GREEN
60-
Color((0, 0, 1)) == Color.BLUE
61-
62-
Color('ff0000') == Color.RED
63-
Color('FF0000') == Color.RED # case_fold makes mapping case insensitive
64-
Color('00ff00') == Color.GREEN
65-
Color('00FF00') == Color.GREEN
66-
Color('0000ff') == Color.BLUE
67-
Color('0000FF') == Color.BLUE
58+
Color((1, 0, 0)) is Color.RED
59+
Color((0, 1, 0)) is Color.GREEN
60+
Color((0, 0, 1)) is Color.BLUE
61+
62+
Color('ff0000') is Color.RED
63+
Color('FF0000') is Color.RED # case_fold makes mapping case insensitive
64+
Color('00ff00') is Color.GREEN
65+
Color('00FF00') is Color.GREEN
66+
Color('0000ff') is Color.BLUE
67+
Color('0000FF') is Color.BLUE
6868
6969
Color.RED.hex == 'ff0000'
7070

0 commit comments

Comments
 (0)