mirror of https://github.com/python/cpython
issue#6442 use in operator instead of has_key
This commit is contained in:
parent
1605b3316f
commit
429a74a11a
|
@ -322,7 +322,7 @@ class AttributesImpl:
|
||||||
return name in self._attrs
|
return name in self._attrs
|
||||||
|
|
||||||
def __contains__(self, name):
|
def __contains__(self, name):
|
||||||
return self._attrs.has_key(name)
|
return name in self._attrs
|
||||||
|
|
||||||
def get(self, name, alternative=None):
|
def get(self, name, alternative=None):
|
||||||
return self._attrs.get(name, alternative)
|
return self._attrs.get(name, alternative)
|
||||||
|
|
Loading…
Reference in New Issue