Author ned.deily
Recipients ned.deily
Date 2011-09-14.22:51:36
SpamBayes Score 3.01813e-07
Marked as misclassified No
Message-id <1316040696.89.0.548775164505.issue12983@psf.upfronthosting.co.za>
In-reply-to
Content
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
History
Date User Action Args
2011-09-14 22:51:36ned.deilysetrecipients: + ned.deily
2011-09-14 22:51:36ned.deilysetmessageid: <1316040696.89.0.548775164505.issue12983@psf.upfronthosting.co.za>
2011-09-14 22:51:36ned.deilylinkissue12983 messages
2011-09-14 22:51:36ned.deilycreate