Skip to content

Commit 546f643

Browse files
Make the first dataclass example more useful (GH-19994) (GH-19997)
(cherry picked from commit 2effef7) Co-authored-by: Ned Batchelder <[email protected]> Co-authored-by: Ned Batchelder <[email protected]>
1 parent 0e4a5e9 commit 546f643

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Doc/library/dataclasses.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ in :pep:`557`.
1919
The member variables to use in these generated methods are defined
2020
using :pep:`526` type annotations. For example this code::
2121

22+
from dataclasses import dataclass
23+
2224
@dataclass
2325
class InventoryItem:
2426
'''Class for keeping track of an item in inventory.'''

0 commit comments

Comments
 (0)