Skip to content

Commit cac0c73

Browse files
committed
Add comment about lazy import
1 parent f228a84 commit cac0c73

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Lib/functools.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -752,6 +752,9 @@ def singledispatch(func):
752752
implementations can be registered using the register() attribute of the
753753
generic function.
754754
"""
755+
# There are many programs that use functools without singledispatch, so we
756+
# trade-off making singledispatch marginally slower for the benefit of
757+
# making start-up of such applications slightly faster.
755758
from types import MappingProxyType
756759
from weakref import WeakKeyDictionary
757760

0 commit comments

Comments
 (0)