[pypy-commit] pypy set-strategies: fixes
l.diekmann
noreply at buildbot.pypy.org
Wed Jan 11 16:53:39 CET 2012
Author: Lukas Diekmann <lukas.diekmann at uni-duesseldorf.de>
Branch: set-strategies
Changeset: r51232:7578dd73ccf8
Date: 2012-01-11 16:53 +0100
http://bitbucket.org/pypy/pypy/changeset/7578dd73ccf8/
Log: fixes
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
@@ -923,14 +923,14 @@
return
stringlist = space.listview_str(w_iterable)
- if stringlist != None:
+ if stringlist is not None:
strategy = space.fromcache(StringSetStrategy)
w_set.strategy = strategy
w_set.sstorage = strategy.get_storage_from_unwrapped_list(stringlist)
return
intlist = space.listview_int(w_iterable)
- if intlist != None:
+ if intlist is not None:
strategy = space.fromcache(IntegerSetStrategy)
w_set.strategy = strategy
w_set.sstorage = strategy.get_storage_from_unwrapped_list(intlist)
diff --git a/pypy/objspace/std/stringobject.py b/pypy/objspace/std/stringobject.py
--- a/pypy/objspace/std/stringobject.py
+++ b/pypy/objspace/std/stringobject.py
@@ -61,7 +61,7 @@
return plain_str2unicode(space, w_self._value)
def listview_str(w_self):
- return list(w_self._value)
+ return [s for s in w_self._value]
registerimplementation(W_StringObject)
More information about the pypy-commit
mailing list