Skip to content

Commit

Permalink
Make the first dataclass example more useful (pythonGH-19994)
Browse files Browse the repository at this point in the history
(cherry picked from commit 2effef7)

Co-authored-by: Ned Batchelder <[email protected]>
  • Loading branch information
nedbat authored and miss-islington committed May 8, 2020
1 parent 0e4a5e9 commit 5bbcb62
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Doc/library/dataclasses.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.'''
Expand Down

0 comments on commit 5bbcb62

Please sign in to comment.