[issue42414] unable to document fields of dataclass
John-Mark Gurney
report at bugs.python.org
Tue Jul 20 14:20:03 EDT 2021
John-Mark Gurney <jmg at funkthat.com> added the comment:
Though this suggestion does work, I am not a fan of this solution.
The issue is that it separates the doc from the definition. This works well if you have only a field fields in the class, But if you get 10-20+ fields, it moves away the docs and makes it easier for people to forget to add documentation to the field when they add additional fields, where w/ my suggestion, it's less likely that it will be forgotten.
Note: I would look at making a patch, but as I don't plan on signing the contributor's agreement, any patch I make will not be usable.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42414>
_______________________________________
More information about the Python-bugs-list
mailing list