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 serhiy.storchaka
Recipients Mark.Shannon, corona10, jstasiak, methane, serhiy.storchaka, uriyyo
Date 2020-11-17.17:56:49
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1605635809.98.0.261800137932.issue42202@roundup.psfhosted.org>
In-reply-to
Content
If you want to measure import time, use

  python -m timeit -s "from sys import modules; modules_copy = modules.copy()" "import black; modules.clear(); modules.update(modules_copy)"

But I would be surprised to see significant difference in this case.

What Mark means, measure the time of creation of nested function.

  python -m timeit "def f(a: int, b: str) -> None: pass"

And maybe test with different number of arguments if there is a difference.
History
Date User Action Args
2020-11-17 17:56:50serhiy.storchakasetrecipients: + serhiy.storchaka, methane, Mark.Shannon, jstasiak, corona10, uriyyo
2020-11-17 17:56:49serhiy.storchakasetmessageid: <1605635809.98.0.261800137932.issue42202@roundup.psfhosted.org>
2020-11-17 17:56:49serhiy.storchakalinkissue42202 messages
2020-11-17 17:56:49serhiy.storchakacreate