[Python-checkins] gh-99026 update dataclasses docs for when annotations are inspected (gh-100798)

miss-islington webhook-mailer at python.org
Fri Jan 6 09:34:36 EST 2023


https://github.com/python/cpython/commit/72263f2a20002ceff443e3a231c713f2e14fe3fe
commit: 72263f2a20002ceff443e3a231c713f2e14fe3fe
branch: 3.11
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: miss-islington <31488909+miss-islington at users.noreply.github.com>
date: 2023-01-06T06:34:30-08:00
summary:

gh-99026 update dataclasses docs for when annotations are inspected (gh-100798)


update dataclasses docs for when annotations are inspected
(cherry picked from commit 659c2607f5b44a8a18a0840d1ac39df8a3219dd5)

Co-authored-by: Akshit Tyagi <37214399+exitflynn at users.noreply.github.com>

files:
M Doc/library/dataclasses.rst

diff --git a/Doc/library/dataclasses.rst b/Doc/library/dataclasses.rst
index 32c524a73487..82faa7b77450 100644
--- a/Doc/library/dataclasses.rst
+++ b/Doc/library/dataclasses.rst
@@ -552,7 +552,7 @@ parameters to :meth:`__post_init__`.  Also see the warning about how
 Class variables
 ---------------
 
-One of two places where :func:`dataclass` actually inspects the type
+One of the few places where :func:`dataclass` actually inspects the type
 of a field is to determine if a field is a class variable as defined
 in :pep:`526`.  It does this by checking if the type of the field is
 ``typing.ClassVar``.  If a field is a ``ClassVar``, it is excluded
@@ -563,7 +563,7 @@ module-level :func:`fields` function.
 Init-only variables
 -------------------
 
-The other place where :func:`dataclass` inspects a type annotation is to
+Another place where :func:`dataclass` inspects a type annotation is to
 determine if a field is an init-only variable.  It does this by seeing
 if the type of a field is of type ``dataclasses.InitVar``.  If a field
 is an ``InitVar``, it is considered a pseudo-field called an init-only



More information about the Python-checkins mailing list