A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2013-April/125141.html below:

[Python-Dev] Is file.readlines(sizehint=N) broken on 2.7?

[Python-Dev] Is file.readlines(sizehint=N) broken on 2.7? [Python-Dev] Is file.readlines(sizehint=N) broken on 2.7?Giampaolo RodolĂ  g.rodola at gmail.com
Fri Apr 5 19:15:45 CEST 2013
with open('test-xxx', 'w') as f:
    f.write('aaa\nbbb\nccc')
with open('test-xxx', 'r') as f:
    print(f.readlines(1))

On Python 3.3 I get:

['aaa\n']

...while on Python 2.7:

['aaa\n', 'bbb\n', 'ccc']


Is this a bug or I'm missing something?


--- Giampaolo
https://code.google.com/p/pyftpdlib/
https://code.google.com/p/psutil/
https://code.google.com/p/pysendfile/
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4