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/2012-June/120341.html below:

[Python-Dev] Raw string syntax inconsistency

[Python-Dev] Raw string syntax inconsistency [Python-Dev] Raw string syntax inconsistencyChristian Heimes lists at cheimes.de
Sun Jun 17 13:45:22 CEST 2012
Hello,

the topic came up on the python-users list today. The raw string syntax
has a minor inconsistency. The ru"" notation is a syntax error although
we support rb"". Neither rb"" nor ru"" are supported on Python 2.7.

Python 3.3:

  works: r"", ur"", br"", rb""
  syntax error: ru""

Python 2.7:

  works: r"", ur"", br""
  syntax error: ru"", rb""

The ru"" notation isn't necessary for Python 2 compatibility but it's
still an inconsistency. The docs [1] also state that 'r' is a prefix,
not a suffix. On the other hand the lexical definition doesn't mention
the u"" notation yet.

Christian

[1]
http://docs.python.org/py3k/reference/lexical_analysis.html#string-and-bytes-literals

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