[Python-ideas] Updated PEP 428 (pathlib)
jeanpierreda at gmail.com
Wed Mar 6 23:22:16 CET 2013
On Wed, Mar 6, 2013 at 5:03 PM, Charles-François Natali
<cf.natali at gmail.com> wrote:
>> 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?
It's a weekend worth of code at most. A simple regex engine is
trivial, and glob is even simpler than that. (For example, we can use
the glob pattern itself as the NFA during simulation).
More information about the Python-ideas