summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorShantanu <12621235+hauntsaninja@users.noreply.github.com>2022-10-31 15:02:02 (GMT)
committerGitHub <noreply@github.com>2022-10-31 15:02:02 (GMT)
commit880bafc574bcd811dd7244f9a82056430b489996 (patch)
treea89b787823eec4cb634c2817d8a5eecfdaeb4976 /Doc
parente98923c0be644c474ce0e318d40e0595e4484106 (diff)
downloadcpython-880bafc574bcd811dd7244f9a82056430b489996.zip
cpython-880bafc574bcd811dd7244f9a82056430b489996.tar.gz
cpython-880bafc574bcd811dd7244f9a82056430b489996.tar.bz2
gh-98576: Fix types in dataclass.InitVar example (gh-98577)
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/dataclasses.rst4
1 files changed, 2 insertions, 2 deletions
diff --git a/Doc/library/dataclasses.rst b/Doc/library/dataclasses.rst
index c4895aa..8472996 100644
--- a/Doc/library/dataclasses.rst
+++ b/Doc/library/dataclasses.rst
@@ -578,8 +578,8 @@ value is not provided when creating the class::
@dataclass
class C:
i: int
- j: int = None
- database: InitVar[DatabaseType] = None
+ j: int | None = None
+ database: InitVar[DatabaseType | None] = None
def __post_init__(self, database):
if self.j is None and database is not None: