[Python-Dev] SRE: regex.set_syntax

Fredrik Lundh fredrik@pythonware.com
Fri, 7 Apr 2000 10:47:37 +0200


Vladimir Marangozov wrote:
> [Guido]
> > If it ain't broken, don't "fix" it.
>=20
> This also explains why socket.connect() generated so much =
resistance...

I'm not sure I see the connection -- the 'regex' module is
already declared obsolete...  so Guido probably meant

  "if it's not even in there, don't waste time on it"

imo, the main reasons for supporting 'regex' are

1) that lots of people are still using it, often for
performance reasons

2) while the import error should be easy to spot,
actually changing from 'regex' to 're' requires some
quite extensive core restructuring, especially com-
pared to what it takes

to fix a broken 'append' or 'connect' call, and 3) it's
fairly easy to do, since the engines use the same
semantics, and 'sre' supports pluggable front-ends.

but alright, I think the consensus here is "(1) get rid
of it completely".  in 1.6a2, perhaps?

</F>