[prev in list] [next in list] [prev in thread] [next in thread] 

List:       python-patches
Subject:    [Patches] [ python-Patches-1225466 ] fileinput openfile patch,
From:       noreply () sourceforge ! net (SourceForge ! net)
Date:       2005-08-31 22:36:01
Message-ID: E1EAbBZ-0001ib-MI () sc8-sf-web4 ! sourceforge ! net
[Download RAW message or body]

Patches item #1225466, was opened at 2005-06-22 13:50
Message generated for change (Comment added) made by birkenfeld
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1225466&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Library (Lib)
Group: Python 2.3
>Status: Closed
>Resolution: Rejected
Priority: 5
Submitted By: Stephan Boettcher (sib4)
Assigned to: Nobody/Anonymous (nobody)
Summary: fileinput openfile patch, bz2fileinput

Initial Comment:
Please consider the enclosed patch to fileinput.py,
which  implements an openfile method of FileInput. 
Included is a use case bz2fileinput.py.


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

>Comment By: Reinhold Birkenfeld (birkenfeld)
Date: 2005-09-01 00:36

Message:
Logged In: YES 
user_id=1188172

In addition to hoffmanm's question about the renaming of
FileInput, two issues:
- An additional module, especially with only a few lines in
it, is not going to be accepted into the stdlib. This is
better done in your own code, where you know what types of
files you will encounter.
See patch #1215184, which implements a similar openhook for
fileinput.
- Only bz2 is too selective. You would have to have modules
"gzfileinput", "urlfileinput", etc. Too much name crowding.

For these reasons, rejecting this patch.

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

Comment By: Michael Hoffman (hoffmanm)
Date: 2005-06-30 09:51

Message:
Logged In: YES 
user_id=987664

Hmmm. This could be useful. Pythonistas could also supply
openfile for, say, URLs as well. I'm kind of lukewarm on it
for some reason--I think that you'd be better off
decompressing the data somewhere else. I also did some
benchmarking the other day and found that fileinput is
really, really slow.

I don't understand the change from Fileinput to _Fileinput.
You're going to need to fix the inplace stuff in
Fileinput.readline().

This needs documentation, and a more detailed description.

Please provide a patch against the latest CVS instead of
Python 2.3.

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

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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic