[pypy-svn] r34125 - pypy/branch/transparent-proxy/pypy/interpreter
fijal at codespeak.net
fijal at codespeak.net
Fri Nov 3 17:05:07 CET 2006
Author: fijal
Date: Fri Nov 3 17:05:06 2006
New Revision: 34125
Modified:
pypy/branch/transparent-proxy/pypy/interpreter/baseobjspace.py
Log:
(arigo, fijal) - small fix for translation.
Modified: pypy/branch/transparent-proxy/pypy/interpreter/baseobjspace.py
==============================================================================
--- pypy/branch/transparent-proxy/pypy/interpreter/baseobjspace.py (original)
+++ pypy/branch/transparent-proxy/pypy/interpreter/baseobjspace.py Fri Nov 3 17:05:06 2006
@@ -27,6 +27,24 @@
return space.finditem(w_dict, w_attr)
return None
+ def setdictvalue(self, space, w_attr, w_value):
+ w_dict = self.getdict()
+ if w_dict is not None:
+ space.set_str_keyed_item(w_dict, w_attr, w_value)
+ return True
+ return False
+
+ def deldictvalue(self, space, w_name):
+ w_dict = self.getdict()
+ if w_dict is not None:
+ try:
+ space.delitem(w_dict, w_name)
+ return True
+ except OperationError, ex:
+ if not ex.match(space, space.w_KeyError):
+ raise
+ return False
+
def setdict(self, space, w_dict):
typename = space.type(self).getname(space, '?')
raise OperationError(space.w_TypeError,
More information about the Pypy-commit
mailing list