axiak/pyre2

re2.compile() fails on Python 3 byte strings

andreasvc opened this issue · 0 comments

>>> import re2
>>> re2.compile(b'foo')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "re2.pyx", line 771, in re2.compile (src/re2.cpp:10370)
  File "re2.pyx", line 926, in re2._compile (src/re2.cpp:12546)
  File "re2.pyx", line 810, in re2.prepare_pattern (src/re2.cpp:11121)
  File "re2.pyx", line 790, in re2.Tokenizer.__init__ (src/re2.cpp:10603)
  File "re2.pyx", line 796, in re2.Tokenizer.__next (src/re2.cpp:10745)
TypeError: 'int' object is not subscriptable