diff options
author | Alex Waygood <Alex.Waygood@Gmail.com> | 2023-09-24 16:18:27 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-24 16:18:27 (GMT) |
commit | 40d1de758100368bce36ad7674bd937acca153bd (patch) | |
tree | 6f8c8fc443b8dc540a79c3d7249f5e62a85904e6 /Lib/functools.py | |
parent | 8d365b60bacf0a7edda24eba2d45aba1c2626fbc (diff) | |
download | cpython-40d1de758100368bce36ad7674bd937acca153bd.zip cpython-40d1de758100368bce36ad7674bd937acca153bd.tar.gz cpython-40d1de758100368bce36ad7674bd937acca153bd.tar.bz2 |
gh-109653: Avoid a top-level import of `types` in `functools` (#109804)
Diffstat (limited to 'Lib/functools.py')
-rw-r--r-- | Lib/functools.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/functools.py b/Lib/functools.py index 6cb5323..55990e7 100644 --- a/Lib/functools.py +++ b/Lib/functools.py @@ -19,8 +19,9 @@ from collections import namedtuple # import types, weakref # Deferred to single_dispatch() from reprlib import recursive_repr from _thread import RLock -from types import GenericAlias +# Avoid importing types, so we can speedup import time +GenericAlias = type(list[int]) ################################################################################ ### update_wrapper() and wraps() decorator |