bpo-36661: Improved code snippets in dataclasses.rst by Kriyszig · Pull Request #14329 · python/cpython
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure this is an improvement. I haven't done an exhaustive survey, but most usages I've seen are from dataclasses import dataclass, not import dataclasses. I honestly don't know what the best style is, or even if what we use here should influence the recommended style.
In any event, all other module-level names (like field) need the same treatment, if we're going to make this change.