[Python-ideas] Updated PEP 428 (pathlib)

Charles-François Natali cf.natali at gmail.com
Wed Mar 6 23:03:09 CET 2013

> Compile the glob pattern to an NFA and simulate the NFA efficiently
> (using Thompson's algorithm or even backtracking with memoization,
> rather than plain backtracking).

Well, I'm sure it would be much better, but that would be a rather
large piece of code, which would probably belong to a new regex
engine, no?

> I wrote an alternative regex implementation (it's on PyPI).
> It's a lot more resistant to catastrophic backtracking.
> What's need for fnmatch is a lot simpler than that! :-)

Yes, I know about your regex implementation, but it looks like it's
not going in anytime soon.
Do you think you could come up with a reasonable - i.e. self-contained
- patch for fnmatch?

More information about the Python-ideas mailing list