Antoine Pitrou <pit...@free.fr> added the comment:

> I know that as hard as it might be for 
> everyone to believe, there are a lot of people who crank lots of non-
> Unicode data with Python.

But "cranking data" implies you'll do something useful with it, and
therefore spend CPU time doing those useful things (likely much more CPU
time than you spent read()ing the data in the first place).

In any case, you can try to open your file in unbuffered mode:
    open("foobar", "rb", buffering=0)

it will bypass the Python buffering layer and will go directly to the
raw C unbuffered object.

> (e.g., okay, they work with bytes instead of 
> strings, but is the bytes type really all that different from the old 
> Python 2 str type?)

No. It's a bit more limited, doesn't support autoconversion to/from
unicode, but that's all.

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue4561>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to