A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2004-June/045791.html below:

[Python-Dev] Allowing u.encode() to return non-strings

[Python-Dev] Allowing u.encode() to return non-strings [Python-Dev] Allowing u.encode() to return non-stringsBill Janssen janssen at parc.com
Wed Jun 30 23:21:28 EDT 2004
Tim,

Thanks for pointing this out.  I find it very hard to know that from
any of the documentation, unless of course you already know it, in
which case you don't need the documentation :-).  In particular, I'd
suggest adding some text to the documentation on codecs.open() which
points out that read and readlines and friends will in fact return
Unicode objects.

I assume, though, that the args to "read()" and friends are still
about bytes.

>> Any file that is not explicitly opened as binary (with the 'b' flag
>> (and, by the way, why isn't the 'b' flag the default for file opening?

> Because it isn't in C.

That's probably why Python doesn't have list comprehensions, either :-).

Bill



More information about the Python-Dev mailing list

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