diff options
author | Emil Hessman <emil@hessman.se> | 2018-09-29 21:25:55 +0200 |
---|---|---|
committer | Emil Hessman <emil@hessman.se> | 2018-09-29 21:25:55 +0200 |
commit | 2b7c1d33132bc80da25a6b2a3eae65dd1a1ff284 (patch) | |
tree | 1a4ff1f88b0fc3804373d1f13853d930a17d1f14 /numpy/distutils/command/config_compiler.py | |
parent | a000144dfa44b38e1681ea5498d88ed6eda9876a (diff) | |
download | numpy-2b7c1d33132bc80da25a6b2a3eae65dd1a1ff284.tar.gz |
MAINT: avoid modifying mutable default values
Diffstat (limited to 'numpy/distutils/command/config_compiler.py')
-rw-r--r-- | numpy/distutils/command/config_compiler.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/numpy/distutils/command/config_compiler.py b/numpy/distutils/command/config_compiler.py index 5e638fecc..bf170063e 100644 --- a/numpy/distutils/command/config_compiler.py +++ b/numpy/distutils/command/config_compiler.py @@ -5,9 +5,12 @@ from numpy.distutils import log #XXX: Linker flags -def show_fortran_compilers(_cache=[]): - # Using cache to prevent infinite recursion - if _cache: return +def show_fortran_compilers(_cache=None): + # Using cache to prevent infinite recursion. + if _cache: + return + elif _cache is None: + _cache = [] _cache.append(1) from numpy.distutils.fcompiler import show_fcompilers import distutils.core |