Re: [Python-3000] Reverse file iteration patch updated

2007-12-09 Thread Oleg Broytmann
On Mon, Dec 10, 2007 at 07:12:54PM +1300, Greg Ewing wrote: > Mark Russell wrote: > > I posted a patch (http://bugs.python.org/issue1677872) a while ago to > > add support for reverse iteration through text files - i.e. making > > this work: > > > > for line in reversed(open(path)): > >

Re: [Python-3000] Reverse file iteration patch updated

2007-12-09 Thread Gregory P. Smith
it doesn't. read the patch. it adds a __reversed__ method. http://bugs.python.org/file8902/reverse-file-iterator-20071209.diff On 12/9/07, Greg Ewing <[EMAIL PROTECTED]> wrote: > > Mark Russell wrote: > > I posted a patch (http://bugs.python.org/issue1677872) a while ago to > > add support for

Re: [Python-3000] Reverse file iteration patch updated

2007-12-09 Thread Greg Ewing
Mark Russell wrote: > I posted a patch (http://bugs.python.org/issue1677872) a while ago to > add support for reverse iteration through text files - i.e. making > this work: > > for line in reversed(open(path)): > print line If this involves hacking reversed() to give it speci

[Python-3000] Reverse file iteration patch updated

2007-12-09 Thread Mark Russell
I posted a patch (http://bugs.python.org/issue1677872) a while ago to add support for reverse iteration through text files - i.e. making this work: for line in reversed(open(path)): print line It steps through the file backwards a line at a time, without reading the entire f