On Tue, Jan 02, 2001 at 03:48:09PM -0500, Tim Peters wrote: >into the FILE* representation in platform-dependent ways. It's a shame that >almost all vendors missed that fgets was defined as a primitive by the C >committee precisely so that vendors *could* pull this speed trick under the >covers. It's also a shame that Perl did it for them <wink>. So, should Python be changed to use fgets(), available on all ANSI C platforms, rather than the glibc-specific getline()? That would be more complicated than the brain-dead easy course of using getline(), which is obviously why I didn't do it; PyFile_GetLine() had annoyingly complicated logic. When this was discussed in comp.lang.python, someone also mentioned getc_unlocked(), which saves the overhead of locking the stream every time, but that didn't seem a fruitful avenue for exploration. --amk
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