We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent afa086f commit b878e44Copy full SHA for b878e44
README.md
@@ -31,13 +31,13 @@ Add properties to Python enumeration values with a simple declarative syntax. [E
31
# the type hints on the Enum class become properties on
32
# each value, matching the order in which they are specified
33
34
- Color.RED.rgb is (1, 0, 0)
35
- Color.GREEN.rgb is (0, 1, 0)
36
- Color.BLUE.rgb is (0, 0, 1)
+ Color.RED.rgb == (1, 0, 0)
+ Color.GREEN.rgb == (0, 1, 0)
+ Color.BLUE.rgb == (0, 0, 1)
37
38
- Color.RED.hex is 'ff0000'
39
- Color.GREEN.hex is '00ff00'
40
- Color.BLUE.hex is '0000ff'
+ Color.RED.hex == 'ff0000'
+ Color.GREEN.hex == '00ff00'
+ Color.BLUE.hex == '0000ff'
41
42
```
43
doc/source/index.rst
@@ -55,16 +55,16 @@ Symmetric type annotations:
55
# Enumeration instances may be instantiated from any Symmetric property
56
# values. Use case_fold for case insensitive matching
57
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
+ Color((1, 0, 0)) is Color.RED
+ Color((0, 1, 0)) is Color.GREEN
+ Color((0, 0, 1)) is Color.BLUE
+
+ Color('ff0000') is Color.RED
+ Color('FF0000') is Color.RED # case_fold makes mapping case insensitive
+ Color('00ff00') is Color.GREEN
+ Color('00FF00') is Color.GREEN
+ Color('0000ff') is Color.BLUE
+ Color('0000FF') is Color.BLUE
68
69
Color.RED.hex == 'ff0000'
70
0 commit comments