8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 735fc2c commit 601f3a7Copy full SHA for 601f3a7
Doc/library/enum.rst
@@ -279,13 +279,20 @@ Data Types
279
>>> Color.RED.value
280
1
281
282
+ Value of the member, can be set in :meth:`~object.__new__`.
283
+
284
.. note:: Enum member values
285
286
Member values can be anything: :class:`int`, :class:`str`, etc. If
287
the exact value is unimportant you may use :class:`auto` instances and an
288
appropriate value will be chosen for you. See :class:`auto` for the
289
details.
290
291
+ While mutable/unhashable values, such as :class:`dict`, :class:`list` or
292
+ a mutable :class:`~dataclasses.dataclass`, can be used, they will have a
293
+ quadratic performance impact during creation relative to the
294
+ total number of mutable/unhashable values in the enum.
295
296
.. attribute:: Enum._name_
297
298
Name of the member.
0 commit comments