[pypy-svn] r70920 - in pypy/trunk/pypy/objspace/std: . test
cfbolz at codespeak.net
cfbolz at codespeak.net
Wed Jan 27 16:00:09 CET 2010
Author: cfbolz
Date: Wed Jan 27 16:00:08 2010
New Revision: 70920
Modified:
pypy/trunk/pypy/objspace/std/dictmultiobject.py
pypy/trunk/pypy/objspace/std/test/test_dictmultiobject.py
Log:
Make modules use a strdict by default.
Modified: pypy/trunk/pypy/objspace/std/dictmultiobject.py
==============================================================================
--- pypy/trunk/pypy/objspace/std/dictmultiobject.py (original)
+++ pypy/trunk/pypy/objspace/std/dictmultiobject.py Wed Jan 27 16:00:08 2010
@@ -57,7 +57,7 @@
classofinstance is not None):
assert w_type is None
return ShadowDetectingDictImplementation(space, classofinstance)
- elif instance or strdict:
+ elif instance or strdict or module:
assert w_type is None
return StrDictImplementation(space)
else:
Modified: pypy/trunk/pypy/objspace/std/test/test_dictmultiobject.py
==============================================================================
--- pypy/trunk/pypy/objspace/std/test/test_dictmultiobject.py (original)
+++ pypy/trunk/pypy/objspace/std/test/test_dictmultiobject.py Wed Jan 27 16:00:08 2010
@@ -771,3 +771,8 @@
class TestDevolvedSharedDictImplementation(BaseTestDevolvedDictImplementation):
ImplementionClass = SharedDictImplementation
+def test_module_uses_strdict():
+ fakespace = FakeSpace()
+ d = fakespace.newdict(module=True)
+ assert isinstance(d, StrDictImplementation)
+
More information about the Pypy-commit
mailing list