From 546f643487f5116b795983c951141e0de78a0049 Mon Sep 17 00:00:00 2001 From: "Miss Islington (bot)" <31488909+miss-islington@users.noreply.github.com> Date: Fri, 8 May 2020 04:52:10 -0700 Subject: Make the first dataclass example more useful (GH-19994) (GH-19997) (cherry picked from commit 2effef7453986bf43a6d921cd471a8bc0722c36a) Co-authored-by: Ned Batchelder 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 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.''' -- cgit v0.12