[pypy-svn] pypy commit 93c72d45e719: remove unused EmptyDictImplemenation
Bitbucket
commits-noreply at bitbucket.org
Wed Dec 15 15:08:16 CET 2010
# HG changeset patch -- Bitbucket.org
# Project pypy
# URL http://bitbucket.org/pypy/pypy/overview
# User Carl Friedrich Bolz <cfbolz at gmx.de>
# Date 1292420161 -3600
# Node ID 93c72d45e71905dac868fcbf5afb5538a571588e
# Parent 7955cb1aaf8f04c8fabc329c3a7c99ecaec602ed
remove unused EmptyDictImplemenation
--- a/pypy/objspace/std/dictmultiobject.py
+++ b/pypy/objspace/std/dictmultiobject.py
@@ -417,45 +417,6 @@ class WaryDictImplementation(StrDictImpl
return self.shadowed[i]
-class EmptyDictImplementation(W_DictMultiObject):
- def __init__(self, space):
- self.space = space
-
- def impl_setitem(self, w_key, w_value):
- self._as_rdict().impl_fallback_setitem(w_key, w_value)
-
- def impl_setitem_str(self, key, w_value):
- self._as_rdict().impl_fallback_setitem_str(key, w_value)
-
- def impl_delitem(self, w_key):
- raise KeyError
-
- def impl_length(self):
- return 0
-
- def impl_getitem_str(self, key):
- return None
-
- def impl_getitem(self, w_key):
- # in case the key is unhashable, try to hash it
- self.space.hash(w_key)
- # return None anyway
- return None
-
- def impl_iter(self):
- # XXX I guess it's not important to be fast in this case?
- return self._as_rdict().impl_fallback_iter()
-
- def impl_clear(self):
- self.r_dict_content = None
-
- def _as_rdict(self):
- r_dict_content = self.initialize_as_rdict()
- return self
-
- def _clear_fields(self):
- pass
-
class RDictIteratorImplementation(IteratorImplementation):
def __init__(self, space, dictimplementation):
IteratorImplementation.__init__(self, space, dictimplementation)
More information about the Pypy-commit
mailing list