Moshe Zadka wrote: > > ... > > Adding .readlines(sizehint) to fileinput, and adding a function > to create something similar to fileinput from a file object (as opposed > to a file name) would help everyone, and doesn't seem to hard. > Is there a gotcha I'm just not seeing? Fileinput is inherently slow because there are too many layers of Python code. I started to consider ways of inverting the logic so that it only called into Python when it needed to switch files but it would have been a much larger patch than Jeff's and I thought that a conservative approach was important. Fileinput should someday be optimized but we can easily get a low-hanging fruit improvement with Jeff's patch. Paul Prescod
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4