Quentin Wenger <[email protected]> added the comment: But Δ has no latin-1 representation. So Δ currently cannot be used as a group name in bytes regex, although it is a valid Python identifier. So that's a bug.
I mean, if you insist of having group names as strings even for bytes regexes, then it is not reasonable to prevent them from going _in_. b"(??<\xce\x94>)" is a valid utf-8-encoded bytestring, why wouldn't you accept it as a valid re pattern? IMHO, either - group names from byte regexes should be returned as bytes - or any utf-8-encoded representation of a valid Python identifier should be accepted as a group name of a bytes regex pattern. ---------- _______________________________________ Python tracker <[email protected]> <https://bugs.python.org/issue40980> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
