[issue17441] Do not cache re.compile
Charles-François Natali
report at bugs.python.org
Sun Mar 24 08:57:45 CET 2013
Charles-François Natali added the comment:
> The docs don't even mention that re.compile() actually uses a cache.
Actually it does:
"""
re.compile(pattern, flags=0)
Note The compiled versions of the most recent patterns passed to re.match(), re.search() or re.compile() are cached, so programs that use only a few regular expressions at a time needn’t worry about compiling regular expressions.
"""
Now, I agree that it's definitely suboptimal...
----------
nosy: +neologix
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue17441>
_______________________________________
More information about the Python-bugs-list
mailing list