Scanning a file
netvaibhav at gmail.com
netvaibhav at gmail.com
Sat Oct 29 22:02:16 EDT 2005
Steve Holden wrote:
> Indeed, but reading one byte at a time is about the slowest way to
> process a file, in Python or any other language, because it fails to
> amortize the overhead cost of function calls over many characters.
>
> Buffering wasn't invented because early programmers had nothing better
> to occupy their minds, remember :-)
Buffer, and then read one byte at a time from the buffer.
Vaibhav
More information about the Python-list
mailing list