Author inada.naoki
Recipients inada.naoki, ncoghlan, rhettinger, xiang.zhang
Date 2016-11-08.06:09:16
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1478585356.61.0.00899987235569.issue28638@psf.upfronthosting.co.za>
In-reply-to
Content
> The slow import is the case only the first time functools is imported. Later imports will just use the cache (sys.modules).

Yes. But first import time is also important for CLI applications.
That's why mercurial and Bazaar has lazy import system.

Since many stdlib uses functools, many applications may be suffered from
slow functools import even if we remove it from site.py.

>  maybe we don't have to copy the entire namedtuple structure?

https://docs.python.org/3.5/library/functools.html#functools.lru_cache

The doc says it's a namedtuple.  So it should be namedtuple compatible.
History
Date User Action Args
2016-11-08 06:09:16inada.naokisetrecipients: + inada.naoki, rhettinger, ncoghlan, xiang.zhang
2016-11-08 06:09:16inada.naokisetmessageid: <1478585356.61.0.00899987235569.issue28638@psf.upfronthosting.co.za>
2016-11-08 06:09:16inada.naokilinkissue28638 messages
2016-11-08 06:09:16inada.naokicreate