Message371516
I noticed that match.groupdict() returns string keys, even for a bytes regex:
```
>>> import re
>>> re.match(b"(?P<a>)", b"").groupdict()
{'a': b''}
```
This seems somewhat strange, because string and bytes matching in re are kind of two separate parts, cf. doc:
> Both patterns and strings to be searched can be Unicode strings (str) as well as 8-bit strings (bytes). However, Unicode strings and 8-bit strings cannot be mixed: that is, you cannot match a Unicode string with a byte pattern or vice-versa; similarly, when asking for a substitution, the replacement string must be of the same type as both the pattern and the search string. |
|
Date |
User |
Action |
Args |
2020-06-14 21:03:34 | matpi | set | recipients:
+ matpi, ezio.melotti, mrabarnett |
2020-06-14 21:03:34 | matpi | set | messageid: <1592168614.73.0.0415067769111.issue40980@roundup.psfhosted.org> |
2020-06-14 21:03:34 | matpi | link | issue40980 messages |
2020-06-14 21:03:34 | matpi | create | |
|