diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2020-05-08 11:52:10 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-08 11:52:10 (GMT) |
commit | 546f643487f5116b795983c951141e0de78a0049 (patch) | |
tree | b8ff1e72b7348d3533a2f2731bc598f48496d2ae /Doc/library | |
parent | 0e4a5e96f011989736bde824ab817146bd7c9cfc (diff) | |
download | cpython-546f643487f5116b795983c951141e0de78a0049.zip cpython-546f643487f5116b795983c951141e0de78a0049.tar.gz cpython-546f643487f5116b795983c951141e0de78a0049.tar.bz2 |
Make the first dataclass example more useful (GH-19994) (GH-19997)
(cherry picked from commit 2effef7453986bf43a6d921cd471a8bc0722c36a)
Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
Diffstat (limited to 'Doc/library')
-rw-r--r-- | Doc/library/dataclasses.rst | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Doc/library/dataclasses.rst b/Doc/library/dataclasses.rst index 37258d4..10edcac 100644 --- a/Doc/library/dataclasses.rst +++ b/Doc/library/dataclasses.rst @@ -19,6 +19,8 @@ in :pep:`557`. The member variables to use in these generated methods are defined using :pep:`526` type annotations. For example this code:: + from dataclasses import dataclass + @dataclass class InventoryItem: '''Class for keeping track of an item in inventory.''' |