File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -270,13 +270,20 @@ Data Types
270
270
>>> Color.RED.value
271
271
1
272
272
273
+ Value of the member, can be set in :meth: `~object.__new__ `.
274
+
273
275
.. note :: Enum member values
274
276
275
277
Member values can be anything: :class: `int `, :class: `str `, etc. If
276
278
the exact value is unimportant you may use :class: `auto ` instances and an
277
279
appropriate value will be chosen for you. See :class: `auto ` for the
278
280
details.
279
281
282
+ While mutable/unhashable values, such as :class: `dict `, :class: `list ` or
283
+ a mutable :class: `~dataclasses.dataclass `, can be used, they will have a
284
+ quadratic performance impact during creation relative to the
285
+ total number of mutable/unhashable values in the enum.
286
+
280
287
.. attribute :: Enum._name_
281
288
282
289
Name of the member.
You can’t perform that action at this time.
0 commit comments