PrakharPythonProgrammer / Grail-0.6

This is the Project Grail-0.6 version released in the year 1999 and we're trying to port this from Python 1 to Python 3.
Other
21 stars 6 forks source link

regex.compile translate parameter problem #16

Open PrakharPythonProgrammer opened 3 years ago

PrakharPythonProgrammer commented 3 years ago

In the Reader.py file(also in some other files) there was one place where instead of regex.compile I wrote re.compile now the problem is that regex.compile took translate parameter which was an optional parameter. This parameter translated the string and the pattern before comparing the string with the pattern. I have come up with one solution. I'll convert the pattern and the string into casefolded strings beforehand and then use the compile function and this time I'll not have to mention that translate parameter. Meanwhile if anyone knows any alternate function for regex.compile which works in Python 3 then please inform me and I'll use that.