INADA Naoki added the comment:

> 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.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue28638>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to