[Patches] [Patch #100740] gzip: readline(), readlines() patch

noreply@sourceforge.net noreply@sourceforge.net
Thu, 27 Jul 2000 19:27:05 -0700


Patch #100740 has been updated. 

Project: 
Category: library
Status: Open
Summary: gzip: readline(), readlines() patch

Follow-Ups:

Date: 2000-Jul-05 18:15
By: akuchling

Comment:
Patch from Wolfgang Grafen <wolfgang.grafen@marconicomms.com> that I didn't want to lose.  From his e-mail:

- readline accepts readsize argument
- readlines accepts readsize argument
- readlines accepts optional 'strip_cr' arguments, which is often convenient for me and also speeds up the routine :)

[amk] The strip_cr thing is a non-starter, but I'll look at adding the other changes.
-------------------------------------------------------

Date: 2000-Jul-27 13:03
By: gvanrossum

Comment:
His addition of readsize to readline() doesn't do the same as readline(n) does for regular files -- there it reads at most n characters, period.

The only part of this patch I like is the readsize argument to readlines(), which *does* (roughly) do the same as for regular files.

You can rework this to implement readline(maxread=-1) and readlines(sizehint=0) and then I'd be okay.
-------------------------------------------------------

Date: 2000-Jul-27 19:27
By: akuchling

Comment:
Completely revised this patch and changed status from 'rejected' to 'open'.  This version gives now the optional
integer arguments to .readline() and .readlines() the same
semantics as they have for regular file objects.  

(The patch also rearranges a few import statements, and completes a sentence fragment in a comment.)

-------------------------------------------------------

-------------------------------------------------------
For more info, visit:

http://sourceforge.net/patch/?func=detailpatch&patch_id=100740&group_id=5470