Skip to content

Commit

Permalink
Make the first dataclass example more useful (GH-19994)
Browse files Browse the repository at this point in the history
  • Loading branch information
nedbat authored May 8, 2020
1 parent d2c349b commit 2effef7
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 2effef7

Please sign in to comment.