Commits

Antonio Cuni committed 1862645

translation fix: we would need a BytesStrategy or a listview_unicode to make it working

  • Participants
  • Parent commits d0c1cb8
  • Branches py3k-listview_str

Comments (0)

Files changed (2)

 
 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
 

File pypy/objspace/std/setobject.py

         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: