Serhiy Storchaka added the comment:

lru_cache() is not used for reasons. The patch makes using cached patterns 
slower by adding an overhead of 4 additional checks. It makes resolving 
attributes of a deferred patterns slower. All this slows down a straight call 
to re.search(pattern, s).

Errors in regular expression now raised only on first use of the pattern. This 
is a drawback from educational and debugging points of view.

The patch also breaks warnings emitted during compiling regular expressions. 
Now they report wrong source line and use wrong line for caching in case of 
-Wonce.

----------
nosy: +serhiy.storchaka

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

Reply via email to