Make the first dataclass example more useful (GH-19994)

This commit is contained in:
Ned Batchelder 2020-05-08 07:39:57 -04:00 committed by GitHub
parent d2c349b190
commit 2effef7453
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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.'''