On 09/01/2014 06:50, Lennart Regebro wrote:
On Thu, Jan 9, 2014 at 1:07 AM, Ben Finney <ben+pyt...@benfinney.id.au> wrote:
Kristján Valur Jónsson <krist...@ccpgames.com> writes:

Believe it or not, sometimes you really don't care about encodings.
Sometimes you just want to parse text files.

Files don't contain text, they contain bytes. Bytes only become text
when filtered through the correct encoding.

To be honest, you can define text as "A stream of bytes that are split
up in lines separated by a linefeed", and do some basic text
processing like that. Just very *basic*, but still. Replacing
characters. Extracting certain lines etc.

This is harder in Python 3, as bytes does not have all the
functionality strings has, like formatting. This can probably be fixed
in Python 3.5, if the relevant PEP gets finished.

For the battery analogy, that's like saying:

"I want a battery."

"What kind?"

"It doesn't matter, as long as it's over 5V."

//Lennart


"That Python 3 battery you sold me blew up when I tried using it".

"We've been telling you for years that could happen".

"I didn't think you actually meant it".

--
My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language.

Mark Lawrence

_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to