You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee=Noneclosed_at=<Date2017-09-30.07:17:17.520>created_at=<Date2017-09-26.03:51:59.535>labels= ['3.7', 'library']
title='Reduce the number of imports for functools'updated_at=<Date2017-09-30.07:17:17.519>user='https://github.com/methane'
Activity
methane commentedon Sep 26, 2017
Makes
import functoolsabout 1.5 ms faster.master:
patched:
serhiy-storchaka commentedon Sep 26, 2017
Initially my patch for bpo-30152 included the change in collections. But it was removed on Raymond's request.
rhettinger commentedon Sep 26, 2017
Go ahead.
terryjreedy commentedon Sep 29, 2017
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 PEP-8 purpose of making all dependencies of the module visible at the top.
methane commentedon Sep 30, 2017
New changeset 9811e80 by INADA Naoki in branch 'master':
bpo-31581: Reduce the number of imports for functools (GH-3757)
9811e80