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/2013-June/126916.html below:

[Python-Dev] eval and triple quoted strings

[Python-Dev] eval and triple quoted strings [Python-Dev] eval and triple quoted stringsGreg Ewing greg.ewing at canterbury.ac.nz
Tue Jun 18 00:18:24 CEST 2013
Guido van Rossum wrote:
> No. Executing a file containing those exact characters produces a
> string containing only '\n' and exec/eval is meant to behave the same
> way. The string may not have originated from a file, so the universal
> newlines behavior of the io module is irrelevant here -- the parser
> must implement its own equivalent processing, and it does.

I'm still not convinced that this is necessary or desirable
behaviour. I can understand the parser doing this as a
workaround before we had universal newlines, but now that
we do, I'd expect any Python string to already have newlines
converted to their canonical representation, and that any CRs
it contains are meant to be there. The parser shouldn't need
to do newline translation a second time.

-- 
Greg
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