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/011294.html below:

readlines :: xrange : range

[Python-Dev] xreadlines : readlines :: xrange : range [Python-Dev] xreadlines : readlines :: xrange : rangePaul Prescod paulp@ActiveState.com
Tue, 02 Jan 2001 15:26:39 -0800
Guido van Rossum wrote:
> 
> ...
> 
> I'm slowly warming up to xreadlines(), although we must be careful to
> consider the consequences (do other file-like objects need to support
> it too?).

The implementation is such that it is pretty easy to add the method to
other file-like objects. It is also easy to use the xreadlines module to
get the same behavior for objects that do not have the method. 
Essentially, file.xreadlines is implemented like this:

def xreadlines(self):
    import xreadlines
    xreadlines.xreadlines(self)

Any object can add the method similarly.

 Paul Prescod



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