[issue40480] "fnmatch" exponential execution time

Tim Peters report at bugs.python.org
Sun May 3 13:06:41 EDT 2020


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

Note that doctest has the same kind of potential problem with matching ellipsis (0 or more characters) in expected output blocks.  Backtracking isn't needed at all to resolve patterns of that limited kind, but I don't think Python's re module supports enough gimmicks to disable backtracking.

So instead doctest has its own

_ellipsis_match()

function to do it in worst-case linear time.

----------
nosy: +tim.peters

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


More information about the Python-bugs-list mailing list