[ python-Feature Requests-1152248 ] Enhance file.readlines by making line separator selectable

SourceForge.net noreply at sourceforge.net
Mon Feb 28 19:57:34 CET 2005


Feature Requests item #1152248, was opened at 2005-02-26 07:24
Message generated for change (Comment added) made by nessus42
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=355470&aid=1152248&group_id=5470

Category: Python Interpreter Core
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Nick Coghlan (ncoghlan)
Assigned to: Nobody/Anonymous (nobody)
Summary: Enhance file.readlines by making line separator selectable

Initial Comment:
There is no canonical way to iterate through a file on
chunks *other* than whole lines without reading the
whole file into memory.

Allowing the separator to be specified as an argument
to file.readlines and file.xreadlines would greatly
simplify the task.

See here for an example interface of the useful options:
http://mail.python.org/pipermail/python-list/2005-February/268482.html

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

Comment By: Douglas Alan (nessus42)
Date: 2005-02-28 18:57

Message:
Logged In: YES 
user_id=401880

In reply to birkenfeld, I'm not sure why you don't want to
call lines separated with an alternate line-separation
string "lines", but if you want to call them something else,
I should think they should be called "records" rather than
"chunks".

|>oug


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

Comment By: Reinhold Birkenfeld (birkenfeld)
Date: 2005-02-26 07:38

Message:
Logged In: YES 
user_id=1188172

I don't know whether (x)readlines is the right place, since
you are _not_ operating on lines.

What about (x)readchunks?

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

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=355470&aid=1152248&group_id=5470


More information about the Python-bugs-list mailing list