[pypy-svn] pypy default: Fix translation

arigo commits-noreply at bitbucket.org
Thu Feb 17 07:13:40 CET 2011


Author: Armin Rigo <arigo at tunes.org>
Branch: 
Changeset: r42097:8ff85bca8bce
Date: 2011-02-17 07:13 +0100
http://bitbucket.org/pypy/pypy/changeset/8ff85bca8bce/

Log:	Fix translation

diff --git a/pypy/module/_collections/__init__.py b/pypy/module/_collections/__init__.py
--- a/pypy/module/_collections/__init__.py
+++ b/pypy/module/_collections/__init__.py
@@ -16,3 +16,12 @@
         'deque' : 'interp_deque.W_Deque',
         '__missing__': 'interp_defaultdict.missing',
         }
+
+    def setup_after_space_initialization(self):
+        """NOT_RPYTHON"""
+        # must remove the interp-level name '__missing__' after it has
+        # been used...  otherwise, some code is not happy about seeing
+        # this code object twice
+        space = self.space
+        space.getattr(self, space.wrap('defaultdict'))  # force importing
+        space.delattr(self, space.wrap('__missing__'))


More information about the Pypy-commit mailing list