[pypy-svn] r10006 - pypy/dist/pypy/objspace/std
tismer at codespeak.net
tismer at codespeak.net
Mon Mar 21 18:38:42 CET 2005
Author: tismer
Date: Mon Mar 21 18:38:42 2005
New Revision: 10006
Modified:
pypy/dist/pypy/objspace/std/fake.py
Log:
changed fake to be more careful about getattribute.
Bug found by test_pickle, which seems to be the most valuable
test around :-)
Modified: pypy/dist/pypy/objspace/std/fake.py
==============================================================================
--- pypy/dist/pypy/objspace/std/fake.py (original)
+++ pypy/dist/pypy/objspace/std/fake.py Mon Mar 21 18:38:42 2005
@@ -56,8 +56,9 @@
kw[meth_name] = __builtin__.eval("lambda m,*args,**kwds: m.%s(*args,**kwds)" % meth_name)
else:
for s, v in cpy_type.__dict__.items():
- if cpy_type is not unicode or s not in ['__add__', '__contains__']:
- kw[s] = v
+ if not (cpy_type is unicode and s in ['__add__', '__contains__']):
+ if s != '__getattribute__' or cpy_type is type(sys):
+ kw[s] = v
def fake__new__(space, w_type, args_w):
args = [space.unwrap(w_arg) for w_arg in args_w]
More information about the Pypy-commit
mailing list