]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fix missing import in dataclass code snippet (GH-29214)
authorLeo <LeoHuckvale@users.noreply.github.com>
Mon, 14 Feb 2022 20:01:53 +0000 (20:01 +0000)
committerGitHub <noreply@github.com>
Mon, 14 Feb 2022 20:01:53 +0000 (12:01 -0800)
field was not imported. It has been added now.

Doc/whatsnew/3.10.rst

index 806170ede15964079475b980ec5aeb93c1a825bb..905305be3176cb7fa852c3e2169a662ef2dea907 100644 (file)
@@ -1019,7 +1019,7 @@ You can specify keyword-only on a per-field basis:
 
 .. code-block:: python
 
-    from dataclasses import dataclass
+    from dataclasses import dataclass, field
 
     @dataclass
     class Birthday: