This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author methane
Recipients Guido.van.Rossum, gvanrossum, iritkatriel, methane, rhettinger, serhiy.storchaka, terry.reedy
Date 2021-08-29.01:36:32
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1630200992.87.0.339278030596.issue36521@roundup.psfhosted.org>
In-reply-to
Content
> You'd just be moving the problem though -- the docstring would have be included in the co_consts array of the surrounding code object instead of the function object.

As far as I know, surrounding code objects (e.g. global, class body) will be removed right after they are executed.
So removing docstring by `func.__doc__ = None` can release memory for docstring, while we can not reduce startup time by this.
History
Date User Action Args
2021-08-29 01:36:32methanesetrecipients: + methane, gvanrossum, rhettinger, terry.reedy, serhiy.storchaka, Guido.van.Rossum, iritkatriel
2021-08-29 01:36:32methanesetmessageid: <1630200992.87.0.339278030596.issue36521@roundup.psfhosted.org>
2021-08-29 01:36:32methanelinkissue36521 messages
2021-08-29 01:36:32methanecreate