[Python-checkins] gh-100633 Tutorial: Fix dataclasses import (#100638)

AlexWaygood webhook-mailer at python.org
Sat Dec 31 05:23:38 EST 2022


https://github.com/python/cpython/commit/98308dbeb110198ebe28bdb7720d3671b3e7f57b
commit: 98308dbeb110198ebe28bdb7720d3671b3e7f57b
branch: main
author: Owain Davies <116417456+OTheDev at users.noreply.github.com>
committer: AlexWaygood <Alex.Waygood at Gmail.com>
date: 2022-12-31T10:23:18Z
summary:

gh-100633 Tutorial: Fix dataclasses import (#100638)

import dataclass not dataclasses from dataclasses

files:
M Doc/tutorial/classes.rst

diff --git a/Doc/tutorial/classes.rst b/Doc/tutorial/classes.rst
index a206ba371976..116801177a3a 100644
--- a/Doc/tutorial/classes.rst
+++ b/Doc/tutorial/classes.rst
@@ -741,7 +741,7 @@ Sometimes it is useful to have a data type similar to the Pascal "record" or C
 "struct", bundling together a few named data items. The idiomatic approach
 is to use :mod:`dataclasses` for this purpose::
 
-    from dataclasses import dataclasses
+    from dataclasses import dataclass
 
     @dataclass
     class Employee:



More information about the Python-checkins mailing list