mirror of https://github.com/python/cpython.git
gh-100633 Tutorial: Fix dataclasses import (GH-100638)
import dataclass not dataclasses from dataclasses
(cherry picked from commit 98308dbeb1
)
Co-authored-by: Owain Davies <116417456+OTheDev@users.noreply.github.com>
This commit is contained in:
parent
f9ddbc0de5
commit
f80ba44f7d
|
@ -740,7 +740,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:
|
||||
|
|
Loading…
Reference in New Issue