[Python-Dev] [python] Re: New lines, carriage returns, and Windows
p.f.moore at gmail.com
Mon Oct 1 14:35:28 CEST 2007
On 01/10/2007, Nick Maclaren <nmm1 at cus.cam.ac.uk> wrote:
> So, damn the outside system, EXACTLY what does Python mean by
> such characters, and EXACTLY what uses of them are discouraged
> as having unspecified meanings? If we could get an answer to
> that precisely enough to write a parse tree with all terminals
> explicit, this problem would go away.
Python, the language, means nothing by the characters. They are bytes
with defined values in a byte string (in 2.x, in 3.0 they are Unicode
characters, but otherwise no difference). The *language* places no
interpretation on them.
Certain library functions place an interpretation on the byte values,
but you need to read the function definition for that. And (a) they
may not all be consistent, and (b) they may say "follows platform
behaviour", but that's the way it is, so you have to live with it.
More information about the Python-Dev