-
-
Notifications
You must be signed in to change notification settings - Fork 34.1k
Open
Labels
stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytopic-dataclassestype-featureA feature request or enhancementA feature request or enhancement
Description
Feature or enhancement
Proposal:
Profiling import time on a client project revealed ~30% of the time for dataclasses was spent creating the docstring, mostly because inspect.signature() is costly. In most executions, this time is wasted, as such automated docstrings are rarely referred to during normal execution.
It’s possible to make the docstring generation lazy by writing a descriptor class.
Has this already been discussed elsewhere?
This is a minor feature, which does not need previous discussion elsewhere
Links to previous discussion of this feature:
No response
Linked PRs
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytopic-dataclassestype-featureA feature request or enhancementA feature request or enhancement