diff options
author | Stefan Behnel <stefan_ml@behnel.de> | 2020-05-05 23:08:22 +0200 |
---|---|---|
committer | Stefan Behnel <stefan_ml@behnel.de> | 2020-05-05 23:08:22 +0200 |
commit | 4d6939fff12b0cbd92dfe0544a452fd1b5bf991a (patch) | |
tree | 5367321eb96f9ebc326d23cedc76fb9d70ab9d2b | |
parent | dccf5885e22af80bd7b7e6b7c05abab7e556bc05 (diff) | |
download | cython-4d6939fff12b0cbd92dfe0544a452fd1b5bf991a.tar.gz |
Reverse the tuple item order in the utility code caching key to move the most selective item first (just in case if we ever get dict collisions).
-rw-r--r-- | Cython/Compiler/Code.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Cython/Compiler/Code.py b/Cython/Compiler/Code.py index 654333f28..08ce46081 100644 --- a/Cython/Compiler/Code.py +++ b/Cython/Compiler/Code.py @@ -408,7 +408,7 @@ class UtilityCodeBase(object): """ Calls .load(), but using a per-type cache based on utility name and file name. """ - key = (cls, from_file, utility_code_name) + key = (utility_code_name, from_file, cls) try: return __cache[key] except KeyError: |