Author: Antonio Cuni <[email protected]>
Branch: py3k-listview_str
Changeset: r58456:18626459a9b2
Date: 2012-10-26 14:33 +0200
http://bitbucket.org/pypy/pypy/changeset/18626459a9b2/
Log: translation fix: we would need a BytesStrategy or a listview_unicode
to make it working
diff --git a/TODO b/TODO
--- a/TODO
+++ b/TODO
@@ -9,6 +9,8 @@
write strategies for unicode list/dict/set, and add
StdObjSpace.listview_unicode & co.
+re-enable the UnicodeSetStrategy in setobject.set_strategy_and_setdata
+
re-enable the kwargs dict strategy in dictmultiobject.py
re-enable view_as_kwargs
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
@@ -915,12 +915,14 @@
w_set.sstorage = w_iterable.get_storage_copy()
return
- stringlist = space.listview_str(w_iterable)
- if stringlist is not None:
- strategy = space.fromcache(UnicodeSetStrategy)
- w_set.strategy = strategy
- w_set.sstorage = strategy.get_storage_from_unwrapped_list(stringlist)
- return
+ # we need to disable this for now: listview_str returns a list of bytes,
+ # we cannot use it with UnicodeSetStrategy
+ ## stringlist = space.listview_str(w_iterable)
+ ## if stringlist is not None:
+ ## strategy = space.fromcache(UnicodeSetStrategy)
+ ## w_set.strategy = strategy
+ ## w_set.sstorage =
strategy.get_storage_from_unwrapped_list(stringlist)
+ ## return
intlist = space.listview_int(w_iterable)
if intlist is not None:
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit