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 eryksun
Recipients Yugi, eryksun, xtreak
Date 2019-08-24.17:58:58
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1566669538.49.0.937772359505.issue37939@roundup.psfhosted.org>
In-reply-to
Content
>    \N{name}   : named character
>    \UXXXXXXXX : 32-bit hexadecimal ordinal (e.g. \U0010ffff)
>    \uXXXX     : 16-bit hexadecimal ordinal (e.g. \uffff)
>    \xXX       : 8-bit hexadecimal ordinal (e.g. \xff)
>    \OOO       : 9-bit octal ordinal (e.g. \777)
>    \OO        : 6-bit octal ordinal (e.g. \77)
>    \O         : 3-bit octal ordinal (e.g. \7)

Note that bytes literals do not implement \N, \U, and \u escape sequences -- e.g. b'\N{SPACE}' is literally just those 9 bytes, not b' '. Also, in bytes literals 9-bit octal sequences wrap around for the [256, 511] range -- e.g. b'\400' ==  b'\000' == b'\x00' and b'\777' == b'\377' == b'\xff'. I don't know whether the latter is intentional. I'd prefer for the compiler to raise a syntax error in this case. Asking for a byte value in the range [256, 511] is nonsense.
History
Date User Action Args
2019-08-24 17:58:58eryksunsetrecipients: + eryksun, xtreak, Yugi
2019-08-24 17:58:58eryksunsetmessageid: <1566669538.49.0.937772359505.issue37939@roundup.psfhosted.org>
2019-08-24 17:58:58eryksunlinkissue37939 messages
2019-08-24 17:58:58eryksuncreate