"LazyLoad", "slot_dict_class"]
import sys
-import warnings
import weakref
class Mapping(object):
def keys(self):
return list(self.__iter__())
- def has_key(self, key):
- warnings.warn("portage.cache.mappings.Mapping.has_key() " + \
- "is deprecated, use the in operator instead", DeprecationWarning)
- return key in self
-
def __contains__(self, key):
try:
value = self[key]
def __contains__(self, key):
return key in self.new or (key not in self.blacklist and key in self.orig)
- def has_key(self, key):
- warnings.warn("portage.cache.mapping.ProtectedDict.has_key() is"
- " deprecated, use the in operator instead",
- DeprecationWarning)
- return key in self
-
if sys.hexversion >= 0x3000000:
keys = __iter__
self.pull = None
return iter(self.d)
- def has_key(self, key):
- warnings.warn("portage.cache.mappings.LazyLoad.has_key() is "
- "deprecated, use the in operator instead",
- DeprecationWarning)
- return key in self
-
-
def __contains__(self, key):
if key in self.d:
return True
def __contains__(self, k):
return hasattr(self, self._prefix + k)
- def has_key(self, k):
- warnings.warn("portage.cache.mappings.SlotDict.has_key()" + \
- " is deprecated, use the in operator instead",
- DeprecationWarning)
- return k in self
-
def pop(self, key, *args):
if len(args) > 1:
raise TypeError(