This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ned.deily
Recipients ned.deily
Date 2011-09-14.22:51:36
SpamBayes Score 3.01813e-07
Marked as misclassified No
Message-id <>
In behavior carried over from Python 2 string literals, Python 3 byte string literals raise a less helpful ValueError exception when an invalid hex escape code is given:

    >>> x = b'\x0'
    ValueError: invalid \x escape

A string literal raises a SyntaxError and a full traceback including line number:

    >>> x = '\x0'
      File "<stdin>", line 1
    SyntaxError: (unicode error) 'unicodeescape' codec can't decode
     bytes in position 0-2: end of string in escape sequence
Date User Action Args
2011-09-14 22:51:36ned.deilysetrecipients: + ned.deily
2011-09-14 22:51:36ned.deilysetmessageid: <>
2011-09-14 22:51:36ned.deilylinkissue12983 messages
2011-09-14 22:51:36ned.deilycreate