[issue40480] "fnmatch" exponential execution time

Tim Peters report at bugs.python.org
Mon May 11 20:12:46 EDT 2020


Tim Peters <tim at python.org> added the comment:

I don't want something probabilistic.  Fix it or don't ;-)

One thing that would work, but at the cost of non-determinism:  do the same as now, but obtain the number part of the group name by applying next() to a module-global private instance of itertools.count().  That will keep the numbers increasing "forever", and across calls.  The point to using .count() is that it's atomic (i.e., won't repeat a number if multiple threads happen to be constructing regexps simultaneously).

It's a darned silly amount of effort, though ;-)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40480>
_______________________________________


More information about the Python-bugs-list mailing list