@@ -965,16 +965,16 @@ want one of them to be the value::
965
965
966
966
967
967
Finer Points
968
- ^^^^^^^^^^^^
968
+ ------------
969
969
970
970
Supported ``__dunder__ `` and ``_sunder_ `` names
971
- """""""""""""""""""""""""""""""""""""""""""""""
971
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
972
972
973
973
The supported ``__dunder__ `` and ``_sunder_ `` names can be found in the :ref: `Enum API documentation <enum-dunder-sunder >`.
974
974
975
975
976
976
_Private__names
977
- """""""""""""""
977
+ ^^^^^^^^^^^^^^^
978
978
979
979
:ref: `Private names <private-name-mangling >` are not converted to enum members,
980
980
but remain normal attributes.
@@ -983,7 +983,7 @@ but remain normal attributes.
983
983
984
984
985
985
``Enum `` member type
986
- """"""""""""""""""""
986
+ ^^^^^^^^^^^^^^^^^^^^
987
987
988
988
Enum members are instances of their enum class, and are normally accessed as
989
989
``EnumClass.member ``. In certain situations, such as writing custom enum
@@ -996,7 +996,7 @@ recommended.
996
996
997
997
998
998
Creating members that are mixed with other data types
999
- """""""""""""""""""""""""""""""""""""""""""""""""""""
999
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1000
1000
1001
1001
When subclassing other data types, such as :class: `int ` or :class: `str `, with
1002
1002
an :class: `Enum `, all values after the ``= `` are passed to that data type's
@@ -1010,7 +1010,7 @@ constructor. For example::
1010
1010
1011
1011
1012
1012
Boolean value of ``Enum `` classes and members
1013
- """""""""""""""""""""""""""""""""""""""""""""
1013
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1014
1014
1015
1015
Enum classes that are mixed with non-:class: `Enum ` types (such as
1016
1016
:class: `int `, :class: `str `, etc.) are evaluated according to the mixed-in
@@ -1025,7 +1025,7 @@ Plain :class:`Enum` classes always evaluate as :data:`True`.
1025
1025
1026
1026
1027
1027
``Enum `` classes with methods
1028
- """""""""""""""""""""""""""""
1028
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1029
1029
1030
1030
If you give your enum subclass extra methods, like the `Planet `_
1031
1031
class below, those methods will show up in a :func: `dir ` of the member,
@@ -1038,7 +1038,7 @@ but not of the class::
1038
1038
1039
1039
1040
1040
Combining members of ``Flag ``
1041
- """""""""""""""""""""""""""""
1041
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1042
1042
1043
1043
Iterating over a combination of :class: `Flag ` members will only return the members that
1044
1044
are comprised of a single bit::
@@ -1058,7 +1058,7 @@ are comprised of a single bit::
1058
1058
1059
1059
1060
1060
``Flag `` and ``IntFlag `` minutia
1061
- """"""""""""""""""""""""""""""""
1061
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1062
1062
1063
1063
Using the following snippet for our examples::
1064
1064
0 commit comments