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/2001-January/011292.html below:

readlines :: xrange : range

[Python-Dev] xreadlines : readlines :: xrange : range [Python-Dev] xreadlines : readlines :: xrange : rangeGuido van Rossum guido@python.org
Tue, 02 Jan 2001 18:06:16 -0500
> I haven't followed this thread closely, and my brain is a bit frazzled at
> the moment, but is there some fundamental reason that the file object's
> readlines method can't be made lazy, perhaps only when given a sizehint?

Yes -- readlines() is documented to return a list, and some people do
things to it that require it to be a real list (e.g. sort or reverse
it or modify it in place or concatenate it with other lists).

--Guido van Rossum (home page: http://www.python.org/~guido/)



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