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 matpi
Recipients malin, matpi
Date 2020-06-16.14:34:12
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1592318052.88.0.70549465929.issue40980@roundup.psfhosted.org>
In-reply-to
Content
I prove my point that the decoding to string is arbitrary:

```
>>> import re
>>> orig_name = "Ř"
>>> orig_ch = orig_name.encode("cp1250") # Because why not?
>>> name = list(re.match(b"(?P<" + orig_ch + b">)", b"").groupdict().keys())[0]
>>> name == orig_name
False
>>> name
'Ø'
>>> name.encode("latin-1") == orig_ch
True
```

For any dynamically-constructed bytes regex pattern, a string group name as output is unusable. Only after latin-1-reencoding can it be safely compared. This latin-1 choice is arbitrary.
History
Date User Action Args
2020-06-16 14:34:12matpisetrecipients: + matpi, malin
2020-06-16 14:34:12matpisetmessageid: <1592318052.88.0.70549465929.issue40980@roundup.psfhosted.org>
2020-06-16 14:34:12matpilinkissue40980 messages
2020-06-16 14:34:12matpicreate