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 @@ -279,13 +279,20 @@ Data Types
279
279
>>> Color.RED.value
280
280
1
281
281
282
+ Value of the member, can be set in :meth: `~object.__new__ `.
283
+
282
284
.. note :: Enum member values
283
285
284
286
Member values can be anything: :class: `int `, :class: `str `, etc. If
285
287
the exact value is unimportant you may use :class: `auto ` instances and an
286
288
appropriate value will be chosen for you. See :class: `auto ` for the
287
289
details.
288
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
+
289
296
.. attribute :: Enum._name_
290
297
291
298
Name of the member.
You can’t perform that action at this time.
0 commit comments