https://discuss.python.org/t/docstrings-for-type-aliases/108901
По моему мнению адекватная замена typing.Doc, и в целом по дизайну совпадает с остальными фичами языка.
Discussions on Python.org
Docstrings for type aliases
Hi! I propose preserving a string literal immediately following a type statement as the resulting alias object’s __doc__ attribute, with support in pydoc to display it in help(), and making that docstring retrievable from ast.TypeAlias. type Timeout = float…

1
9
4
2
1
1
9
4
2
1
18 сентября 2026 г. 3,6 тыс.