Message397889
I've put up a simple PoC PR adding a __field_doc__ optional dict attr to dataclass, which would add the docs to class docstring:
@dataclass
class A:
__field_doc__ = dict(num='number of widgets', total='total widgets')
total: int
num: int = 5
print(A.__doc__)
OUTPUT
---
A(total: int, num: int = 5)
num: int [5] -- number of widgets
total: int -- total widgets |
|
Date |
User |
Action |
Args |
2021-07-20 17:27:48 | andrei.avk | set | recipients:
+ andrei.avk, rhettinger, terry.reedy, eric.smith, jmg |
2021-07-20 17:27:47 | andrei.avk | set | messageid: <1626802067.99.0.797883837008.issue42414@roundup.psfhosted.org> |
2021-07-20 17:27:47 | andrei.avk | link | issue42414 messages |
2021-07-20 17:27:47 | andrei.avk | create | |
|