On Sun, Jul 1, 2018 at 4:00 PM, Abdur-Rahmaan Janhangeer
<arj.pyt...@gmail.com> wrote:
> one common scenario is
>
> C:\Users\....
>
> where \U is taken as a unicode litteral

This one is especially annoying in Python 2, since it makes raw
unicode strings useless for common path literals. For example:

    >>> ur'C:\Users'
      File "<stdin>", line 1
    SyntaxError: (unicode error) 'rawunicodeescape' codec can't decode
    bytes in position 2-3: truncated \uXXXX

    >>> ur'C:\users'
      File "<stdin>", line 1
    SyntaxError: (unicode error) 'rawunicodeescape' codec can't decode
    bytes in position 2-3: truncated \uXXXX

Python 2 raw strings are half-baked.
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to