python3 raw strings and \u escapes

Devin Jeanpierre jeanpierreda at gmail.com
Wed May 30 10:10:21 EDT 2012


On Wed, May 30, 2012 at 2:52 AM, rurpy at yahoo.com <rurpy at yahoo.com> wrote:
> Was there a reason for dropping the lexical processing of
> \u escapes in strings in python3 (other than to add another
> annoyance in a long list of python3 annoyances?)
>
> And is there no choice for me but to choose between the two
> poor choices I mention above to deal with this problem?

The solution of r'[' + '\u3000' + r']...' was pretty good.

Real reason I posted: Maybe the re module should handle \u escapes, in
addition to the other backslash escapes it processes?

This would be backwards incompatible, though, so maybe it's too late.

-- Devin



More information about the Python-list mailing list