File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -556,6 +556,8 @@ See the section below on init-only variables for ways to pass
556
556
parameters to :meth: `!__post_init__ `. Also see the warning about how
557
557
:func: `replace ` handles ``init=False `` fields.
558
558
559
+ .. _dataclasses-class-variables :
560
+
559
561
Class variables
560
562
---------------
561
563
@@ -567,6 +569,8 @@ from consideration as a field and is ignored by the dataclass
567
569
mechanisms. Such ``ClassVar `` pseudo-fields are not returned by the
568
570
module-level :func: `fields ` function.
569
571
572
+ .. _dataclasses-init-only-variables :
573
+
570
574
Init-only variables
571
575
-------------------
572
576
@@ -598,6 +602,8 @@ value is not provided when creating the class::
598
602
In this case, :func: `fields ` will return :class: `Field ` objects for ``i `` and
599
603
``j ``, but not for ``database ``.
600
604
605
+ .. _dataclasses-frozen :
606
+
601
607
Frozen instances
602
608
----------------
603
609
@@ -611,6 +617,8 @@ There is a tiny performance penalty when using ``frozen=True``:
611
617
:meth: `~object.__init__ ` cannot use simple assignment to initialize fields, and
612
618
must use :meth: `!__setattr__ `.
613
619
620
+ .. _dataclasses-inheritance :
621
+
614
622
Inheritance
615
623
-----------
616
624
You can’t perform that action at this time.
0 commit comments