[issue40480] "fnmatch" exponential execution time

2020-05-03 Thread kleshni
kleshni added the comment: >So the solution is to replace multiple asterisks with a single one No, this is not a solution. This glob also hangs: fnmatch.fnmatchcase("a" * 32, "*a" * 16 + "b") And again,

[issue40480] "fnmatch" exponential execution time

2020-05-03 Thread kleshni
New submission from kleshni : Hello. The following code hangs: import fnmatch fnmatch.fnmatchcase("a" * 32, "*" * 16 + "b") Measurements show that its execution time rises exponentially with the number of asterisks. Bash and SQLite 3 process this glob instantly.