STINNER Victor added the comment:

New approach: patch 5 now compares indexgroup, groupindex and code instead of 
comparing pattern, to handle correctly two equal pattern strings compiled with 
the re.LOCALE flag and two different locales.

The patch also converts indexgroup list to a tuple to be able to hash it. (It 
also prevents modification, but this is just a side effect, and groupindex 
remains a mutable dictionary.)

_sre.compile() checks types which helps to identify a bug in unit tests.

----------
Added file: http://bugs.python.org/file45541/pattern_compare-5.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue28727>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to