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/2002-July/026669.html below:

[Python-Dev] Single- vs. Multi-pass iterability

[Python-Dev] Single- vs. Multi-pass iterabilityAlex Martelli aleax@aleax.it
Thu, 18 Jul 2002 00:06:45 +0200
On Wednesday 17 July 2002 08:07 pm, Guido van Rossum wrote:
> OK, I'll wait to see if someone submits a working patch.  I still find
> it a non-issue myself.

OK, I'm gonna give it a try -- kludging up Oren's patch so that
the xreadlines object is able to hold a non-addref'd pointer to
the file object (when it's for internal use of the file object) and,
as long as I'm at it, also including the little further kludge that
makes f.readline delegate to f.next if f is holding an xreadlines
object.  Oh, and dropping the xreadlines object on a seek, too.

It's just a few lines' changes to two files after all,
Objects/fileobject.c and Modules/xreadlines.c.  A bit kludgey
and tricky, admittedly, which is perhaps not the nicest thing
in the world given that fileobject.c isn't the shortest, simplest,
or least crucial part of Python.  But anyway, I think I'll have it
ready by early tomorrow my time (it's past midnight and I'm
past the age for all-nighters:-).


Alex




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