New submission from Leon Matthews <[email protected]>:
In the code sample documentation for other modules we show the necessary
imports, we should do the same for dataclasses.
For example, the very first example uses the `dataclass` decorator without
importing it first. It should read::
from dataclasses import dataclass
@dataclass
class InventoryItem:
...
----------
assignee: docs@python
components: Documentation
messages: 355289
nosy: Leon Matthews, docs@python
priority: normal
severity: normal
status: open
title: Dataclasses documentation should show the necessary imports
type: enhancement
versions: Python 3.8
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue38574>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com