Skip to content

Commit 8af15cf

Browse files
gh-99026 update dataclasses docs for when annotations are inspected (gh-100798)
update dataclasses docs for when annotations are inspected (cherry picked from commit 659c260) Co-authored-by: Akshit Tyagi <[email protected]>
1 parent ebe8d23 commit 8af15cf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Doc/library/dataclasses.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -535,7 +535,7 @@ parameters to :meth:`__post_init__`. Also see the warning about how
535535
Class variables
536536
---------------
537537

538-
One of two places where :func:`dataclass` actually inspects the type
538+
One of the few places where :func:`dataclass` actually inspects the type
539539
of a field is to determine if a field is a class variable as defined
540540
in :pep:`526`. It does this by checking if the type of the field is
541541
``typing.ClassVar``. If a field is a ``ClassVar``, it is excluded
@@ -546,7 +546,7 @@ module-level :func:`fields` function.
546546
Init-only variables
547547
-------------------
548548

549-
The other place where :func:`dataclass` inspects a type annotation is to
549+
Another place where :func:`dataclass` inspects a type annotation is to
550550
determine if a field is an init-only variable. It does this by seeing
551551
if the type of a field is of type ``dataclasses.InitVar``. If a field
552552
is an ``InitVar``, it is considered a pseudo-field called an init-only

0 commit comments

Comments
 (0)