Skip to content

Commit f7ad4ff

Browse files
gh-100633 Tutorial: Fix dataclasses import (GH-100638)
import dataclass not dataclasses from dataclasses (cherry picked from commit 98308db) Co-authored-by: Owain Davies <[email protected]>
1 parent 504aa92 commit f7ad4ff

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Doc/tutorial/classes.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -740,7 +740,7 @@ Sometimes it is useful to have a data type similar to the Pascal "record" or C
740740
"struct", bundling together a few named data items. The idiomatic approach
741741
is to use :mod:`dataclasses` for this purpose::
742742

743-
from dataclasses import dataclasses
743+
from dataclasses import dataclass
744744

745745
@dataclass
746746
class Employee:

0 commit comments

Comments
 (0)