Author: Carl Friedrich Bolz <[email protected]>
Branch: 
Changeset: r78349:ad7bfb1386af
Date: 2015-06-29 16:22 +0200
http://bitbucket.org/pypy/pypy/changeset/ad7bfb1386af/

Log:    implement file.readlines more efficiently by not wrapping every
        individual string in the result (only to unwrap it again in the list
        creation code to make a bytes strategy list)

diff --git a/pypy/module/_file/interp_file.py b/pypy/module/_file/interp_file.py
--- a/pypy/module/_file/interp_file.py
+++ b/pypy/module/_file/interp_file.py
@@ -613,7 +613,7 @@
 # ____________________________________________________________
 
 def wrap_list_of_str(space, lst):
-    return space.newlist([space.wrap(s) for s in lst])
+    return space.newlist_bytes(lst)
 
 class FileState:
     def __init__(self, space):
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to