[issue35745] Add import statement in dataclass code snippet
New submission from Windson Yang <wiwindson@outlook.com>: Most of the example in https://docs.python.org/3/library/dataclasses.html miss code like from dataclasses import dataclass, field from typing import List I think we should add this statement in the code snippet. ---------- assignee: docs@python components: Documentation messages: 333707 nosy: Windson Yang, docs@python priority: normal severity: normal status: open title: Add import statement in dataclass code snippet type: enhancement versions: Python 3.7, Python 3.8 _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue35745> _______________________________________
Windson Yang <wiwindson@outlook.com> added the comment: I'm not sure if we should put from dataclasses import dataclass everywhere or we should put it just in the first example as I did in the PR. ---------- _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue35745> _______________________________________
Karthikeyan Singaravelan <tir.karthi@gmail.com> added the comment: See also https://bugs.python.org/issue36661 ---------- nosy: +eric.smith, xtreak _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue35745> _______________________________________
Eric V. Smith <eric@trueblade.com> added the comment: Closed in favor of issue 36661 (which I realize was opened later, but has more discussion, so I'm using it going forward). ---------- resolution: -> duplicate stage: -> resolved status: open -> closed _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue35745> _______________________________________
participants (3)
-
Eric V. Smith
-
Karthikeyan Singaravelan
-
Windson Yang