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 terry.reedy
Recipients bup, ezio.melotti, mrabarnett, serhiy.storchaka, terry.reedy
Date 2019-06-28.21:04:31
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
says, for \ooo, "In a bytes literal, hexadecimal and octal escapes denote the byte with the given value. In a string literal, these escapes denote a Unicode character with the given value."

I agree that sometimes truncating an invalid integer instead of always raising ValueError is strange.

>>> ord(b'\407')
>>> bytes((0o407,))
ValueError: bytes must be in range(0, 256)

I don't know is there was an intentional back-compatibility reason for this.

Without an example of re raising, I don't understand the re complaint.
Date User Action Args
2019-06-28 21:04:31terry.reedysetrecipients: + terry.reedy, ezio.melotti, mrabarnett, serhiy.storchaka, bup
2019-06-28 21:04:31terry.reedysetmessageid: <>
2019-06-28 21:04:31terry.reedylinkissue37367 messages
2019-06-28 21:04:31terry.reedycreate