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 serhiy.storchaka
Recipients benjamin.peterson, gvanrossum, serhiy.storchaka, timehorse
Date 2014-11-08.13:16:22
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1415452582.34.0.540380926758.issue1282@psf.upfronthosting.co.za>
In-reply-to
Content
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?
History
Date User Action Args
2014-11-08 13:16:22serhiy.storchakasetrecipients: + serhiy.storchaka, gvanrossum, timehorse, benjamin.peterson
2014-11-08 13:16:22serhiy.storchakasetmessageid: <1415452582.34.0.540380926758.issue1282@psf.upfronthosting.co.za>
2014-11-08 13:16:22serhiy.storchakalinkissue1282 messages
2014-11-08 13:16:22serhiy.storchakacreate