On Sat, 2021-12-11 at 17:02 -0800, Christopher Barker wrote: > It [Annotated] has a number of possible unspecified uses, but > fundamentally, it's about the adding information to the type, not to > the attribute -- e.g. not really intended for docstrings.
Ah, good point. I've conflated the two because dataclass attributes are used to define the schema of the dataclass. For general purpose attribute docstrings (module, class), I agree Annotated is probably inappropriate. > Perhaps a better way to do that than to use Annotated would be to > introduce new "thing", maybe in teh typoing module, like > "Documented": I think this will suffer from the same problem as Annotated: it would document the type, not the attribute itself. > Anyway, what I'm getting at is that it needs to be determined whare > to put the docstrings before we can get very far with this idea. How is Sphinx is pulling the string below the attribute? Whatever mechanism is to be used, I propose it must allow for runtime introspection.
_______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/LG7NQUZ67XTVXUAEXRTNHTXFXIH4NDYC/ Code of Conduct: http://python.org/psf/codeofconduct/