[Python-Dev] SRE: regex.set_syntax

Guido van Rossum guido@python.org
Tue, 04 Apr 2000 15:57:47 -0400


> one of my side projects for SRE is to create a regex-compatible
> frontend.  since both engines have NFA semantics, this mostly
> involves writing an alternate parser.
> 
> however, when I started playing with that, I completely forgot
> about the regex.set_syntax() function.  supporting one extra
> syntax isn't that much work, but a whole bunch of them?
> 
> so what should we do?
> 
> 1. completely get rid of regex (bjorn would love that,
>    don't you think?)

(Who's bjorn?)

> 2. remove regex.set_syntax(), and tell people who've
>    used it that they're SOL.
> 
> 3. add all the necessary flags to the new parser...
> 
> 4. keep regex around as before, and live with the
>    extra code bloat.
> 
> comments?

I'm for 4, then deprecating it, and eventually switching to 1.  This
saves you effort debugging compatibility with an obsolete module.

If it ain't broken, don't "fix" it.

--Guido van Rossum (home page: http://www.python.org/~guido/)