Re: [Python-Dev] lifting of prohibition against readlines inside a "for line in file" in Py3?

2009-02-19 Thread Antoine Pitrou
Hello, bitdance.com> writes: > > Since the 'pipe' comment is an XXX, it is not clear that my use case > is covered. However, the actual implementation of readinto seems to > only call 'read' once, so as long as the 'read' of the subclass returns > whatever bytes are available, then it looks go

Re: [Python-Dev] lifting of prohibition against readlines inside a "for line in file" in Py3?

2009-02-19 Thread rdmurray
On Wed, 18 Feb 2009 at 20:31, Guido van Rossum wrote: On Wed, Feb 18, 2009 at 6:38 PM, wrote: On Wed, 18 Feb 2009 at 21:25, Antoine Pitrou wrote: Nick Coghlan gmail.com> writes: I *think* the 2.x system had an internal buffer that was used by the file iterator, but not by the file methods

Re: [Python-Dev] lifting of prohibition against readlines inside a "for line in file" in Py3?

2009-02-19 Thread Nick Coghlan
Terry Reedy wrote: > I suspect your original query got lost in the shuffle. If you do not > get an answer this time, file an issue on the tracker bugs.python.org > but do not select whether it is a behavior or doc issue. At least, it > will stay open until resolved. Filing a tracker issue is prob

Re: [Python-Dev] lifting of prohibition against readlines inside a "for line in file" in Py3?

2009-02-18 Thread Guido van Rossum
On Wed, Feb 18, 2009 at 6:38 PM, wrote: > On Wed, 18 Feb 2009 at 21:25, Antoine Pitrou wrote: >> >> Nick Coghlan gmail.com> writes: >>> >>> I *think* the 2.x system had an internal buffer that was used by the >>> file iterator, but not by the file methods. With the new IO stack for >>> 3.0, ther

Re: [Python-Dev] lifting of prohibition against readlines inside a "for line in file" in Py3?

2009-02-18 Thread rdmurray
On Wed, 18 Feb 2009 at 21:25, Antoine Pitrou wrote: Nick Coghlan gmail.com> writes: I *think* the 2.x system had an internal buffer that was used by the file iterator, but not by the file methods. With the new IO stack for 3.0, there is now a common buffer shared by all the file operations (in

Re: [Python-Dev] lifting of prohibition against readlines inside a "for line in file" in Py3?

2009-02-18 Thread Terry Reedy
Mitchell L Model wrote: In Digest Vol. 67, Issue 52 (13 Feb 2009) I pointed out that Python 2's prohibition against performing readlines on a file being iterated over appears to have been lifted in Python 3. I asked if this was intentional and whether it should be add to the "What's New" docume

Re: [Python-Dev] lifting of prohibition against readlines inside a "for line in file" in Py3?

2009-02-18 Thread Antoine Pitrou
Hello, Nick Coghlan gmail.com> writes: > > I *think* the 2.x system had an internal buffer that was used by the > file iterator, but not by the file methods. With the new IO stack for > 3.0, there is now a common buffer shared by all the file operations > (including iteration). > > However, gi

Re: [Python-Dev] lifting of prohibition against readlines inside a "for line in file" in Py3?

2009-02-18 Thread Nick Coghlan
Mitchell L Model wrote: > I didn't get any response. Is this the wrong list for the question? Did > appropriate responders assume another would respond? Probably the latter (I know I left it to those that had more to do with the IO stack rewrite). This is definitely the right list for the question

Re: [Python-Dev] lifting of prohibition against readlines inside a "for line in file" in Py3?

2009-02-18 Thread Leif Walsh
On Wed, Feb 18, 2009 at 12:42 PM, Mitchell L Model wrote: > I'd appreciate comments -- especially a redirection to a different list, if > this one isn't appropriate for my query. It seems as though you have the right list, but perhaps whoever knows about the change is busy, or maybe several peopl

[Python-Dev] lifting of prohibition against readlines inside a "for line in file" in Py3?

2009-02-18 Thread Mitchell L Model
In Digest Vol. 67, Issue 52 (13 Feb 2009) I pointed out that Python 2's prohibition against performing readlines on a file being iterated over appears to have been lifted in Python 3. I asked if this was intentional and whether it should be add to the "What's New" documentation. I also express

[Python-Dev] lifting of prohibition against readlines inside a "for line in file" in Py3?

2009-02-13 Thread Mitchell L Model
I discovered today that Python 2's prohibition against performing readlines on a file being iterated over appears to have been lifted in Python 3. Is this intentional? If it is, should it be added to the What's New in the documentation? I haven't been able to find anything mentioning the change