[pypy-commit] pypy set-strategies: fix needed for translation

l.diekmann noreply at buildbot.pypy.org
Thu Nov 10 13:52:09 CET 2011


Author: Lukas Diekmann <lukas.diekmann at uni-duesseldorf.de>
Branch: set-strategies
Changeset: r49243:23d0550fda0a
Date: 2011-10-14 15:02 +0200
http://bitbucket.org/pypy/pypy/changeset/23d0550fda0a/

Log:	fix needed for translation

diff --git a/pypy/objspace/std/setobject.py b/pypy/objspace/std/setobject.py
--- a/pypy/objspace/std/setobject.py
+++ b/pypy/objspace/std/setobject.py
@@ -859,8 +859,8 @@
 def set_strategy_and_setdata(space, w_set, w_iterable):
     from pypy.objspace.std.intobject import W_IntObject
     if w_iterable is None :
-        w_set.strategy = space.fromcache(EmptySetStrategy)
-        w_set.sstorage = w_set.strategy.get_empty_storage()
+        w_set.strategy = strategy = space.fromcache(EmptySetStrategy)
+        w_set.sstorage = strategy.get_empty_storage()
         return
 
     if isinstance(w_iterable, W_BaseSetObject):
@@ -871,8 +871,8 @@
     iterable_w = space.listview(w_iterable)
 
     if len(iterable_w) == 0:
-        w_set.strategy = space.fromcache(EmptySetStrategy)
-        w_set.sstorage = w_set.strategy.get_empty_storage()
+        w_set.strategy = strategy = space.fromcache(EmptySetStrategy)
+        w_set.sstorage = strategy.get_empty_storage()
         return
 
     # check for integers


More information about the pypy-commit mailing list