From 5bbcb624736e1708b2487607faf9ff8926c048b0 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Fri, 8 May 2020 07:39:57 -0400 Subject: [PATCH] Make the first dataclass example more useful (GH-19994) (cherry picked from commit 2effef7453986bf43a6d921cd471a8bc0722c36a) Co-authored-by: Ned Batchelder --- Doc/library/dataclasses.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Doc/library/dataclasses.rst b/Doc/library/dataclasses.rst index 37258d4ebc7386..10edcac7e8a9b6 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.'''