New submission from Nick Coghlan <ncogh...@gmail.com>: When PEP 414 restored support for explicit Unicode literals in Python 3, the "ur" string prefix was deemed to be a synonym for the "r" prefix.
However, "ur" in 2.x was only kinda-sorta-raw, since it still supported Unicode escapes: $ python Python 2.7.3 (default, Apr 30 2012, 21:18:11) [GCC 4.7.0 20120416 (Red Hat 4.7.0-2)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> print(ur'\u03B3') γ By contrast, they really are raw strings in 3.x, because the default UTF-8 source code encoding allows arbitrary Unicode characters to be included directly in the literal: $ ./python Python 3.3.0a4+ (default:cfbf6aa5c9e3+, Jun 17 2012, 15:25:45) [GCC 4.7.0 20120507 (Red Hat 4.7.0-5)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> r"γ" 'γ' >>> "\U000003B3" 'γ' >>> r"\U000003B3" '\\U000003B3' >>> ur"\U000003B3" '\\U000003B3' Rather than reintroducing this weird legacy not-really-raw string behaviour, I'd prefer to revert this aspect of the PEP 414 changes completely. ---------- components: Interpreter Core messages: 163062 nosy: ncoghlan priority: normal severity: normal stage: needs patch status: open title: Drop support for the "ur" string prefix type: behavior versions: Python 3.3 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue15096> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com