[issue31581] Reduce the number of imports for functools

2017-09-30 Thread INADA Naoki
Change by INADA Naoki : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___ Py

[issue31581] Reduce the number of imports for functools

2017-09-30 Thread INADA Naoki
INADA Naoki added the comment: New changeset 9811e80fd0ed9d74c76a66f1dd4e4b8afa9e8f53 by INADA Naoki in branch 'master': bpo-31581: Reduce the number of imports for functools (GH-3757) https://github.com/python/cpython/commit/9811e80fd0ed9d74c76a66f1dd4e4b8afa9e8f53 -- _

[issue31581] Reduce the number of imports for functools

2017-09-29 Thread Terry J. Reedy
Terry J. Reedy added the comment: An option for deferred imports would be to leave a comment at the top where the import would otherwise be. Example: # import types, weakref # Deferred to single_dispatch() This accomplishes the PEP8 purpose of making all dependencies of the module visible

[issue31581] Reduce the number of imports for functools

2017-09-25 Thread Raymond Hettinger
Raymond Hettinger added the comment: Go ahead. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue31581] Reduce the number of imports for functools

2017-09-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Initially my patch for issue30152 included the change in collections. But it was removed on Raymond's request. -- nosy: +rhettinger, serhiy.storchaka ___ Python tracker ___

[issue31581] Reduce the number of imports for functools

2017-09-25 Thread INADA Naoki
Changes by INADA Naoki : -- keywords: +patch pull_requests: +3743 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list

[issue31581] Reduce the number of imports for functools

2017-09-25 Thread INADA Naoki
New submission from INADA Naoki: Makes `import functools` about 1.5 ms faster. * heapq is used only when Counter.most_common(n). * types and waakref is used only for singledispatch. master: import time: - _functools 76 us (self 76 us) import time: - _operator 110 us (self 110 us) impor