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