summaryrefslogtreecommitdiffstats
path: root/SCons/Environment.py
diff options
context:
space:
mode:
authorMats Wichmann <mats@linux.com>2021-03-11 23:15:30 (GMT)
committerMats Wichmann <mats@linux.com>2021-03-11 23:15:30 (GMT)
commit31709c31fa2d192f57d37e57d5cda1f7d25b8710 (patch)
tree80a604229fedd8d942a8f678522a121d224ce558 /SCons/Environment.py
parent628af64d29249b18300ac3241dacc6f7d64357ca (diff)
downloadSCons-31709c31fa2d192f57d37e57d5cda1f7d25b8710.zip
SCons-31709c31fa2d192f57d37e57d5cda1f7d25b8710.tar.gz
SCons-31709c31fa2d192f57d37e57d5cda1f7d25b8710.tar.bz2
PR #3898: address review comments
Sider fix - repeated __contains__ in one test Simplify __contains__ in Environment Add comment on performance hack in the two uniquer functions Signed-off-by: Mats Wichmann <mats@linux.com>
Diffstat (limited to 'SCons/Environment.py')
-rw-r--r--SCons/Environment.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/SCons/Environment.py b/SCons/Environment.py
index aca44f7..fbb5399 100644
--- a/SCons/Environment.py
+++ b/SCons/Environment.py
@@ -413,7 +413,7 @@ class SubstitutionEnvironment:
return self._dict.get(key, default)
def __contains__(self, key):
- return self._dict.__contains__(key)
+ return key in self._dict
def keys(self):
"""Emulates the keys() method of dictionaries."""
@@ -2411,9 +2411,9 @@ class OverrideEnvironment(Base):
return self.__dict__['__subject'].get(key, default)
def __contains__(self, key):
- if self.__dict__['overrides'].__contains__(key):
+ if key in self.__dict__['overrides']
return True
- return self.__dict__['__subject'].__contains__(key)
+ return key in self.__dict__['__subject']
def Dictionary(self, *args):
d = self.__dict__['__subject'].Dictionary().copy()