Message230855
Actually non-hashable patterns are not supported.
>>> re.match(bytearray(b'.'), b'x')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/serhiy/py/cpython/Lib/re.py", line 163, in match
return _compile(pattern, flags).match(string)
File "/home/serhiy/py/cpython/Lib/re.py", line 281, in _compile
p, loc = _cache[type(pattern), pattern, flags]
TypeError: unhashable type: 'bytearray'
Should it be considered as a bug? |
|
Date |
User |
Action |
Args |
2014-11-08 13:16:22 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, gvanrossum, timehorse, benjamin.peterson |
2014-11-08 13:16:22 | serhiy.storchaka | set | messageid: <1415452582.34.0.540380926758.issue1282@psf.upfronthosting.co.za> |
2014-11-08 13:16:22 | serhiy.storchaka | link | issue1282 messages |
2014-11-08 13:16:22 | serhiy.storchaka | create | |
|