[Python-Dev] why isn't SRE a shared module?

Guido van Rossum guido@beopen.com
Mon, 10 Jul 2000 13:43:29 -0500

> from Modules/Setup.in:
>     # The modules listed here can't be built as shared libraries for
>     # various reasons; therefore they are listed here instead of in the
>     # normal order.
>     # Some modules that are normally always on:
>     regex regexmodule.c regexpr.c # Regular expressions, GNU Emacs style
>     pcre pcremodule.c pypcre.c # Regular expressions, Perl style (for re.py)
>     posix posixmodule.c  # posix (UNIX) system calls
>     signal signalmodule.c  # signal(2)
>     _sre _sre.c   # Fredrik Lundh's new regular expressions
> possibly a stupid question, but what exactly is SRE doing
> in there?

I think the comments are confusing.  The first comment has it right --
I think posix and signal *must* be static.  I'm not so sure about the
rest...  It's just recommended to link them statically because you'll
end up loading them into 99% of all Python processes anyway.  Of
course, that's no longer true fo regex or pcre so they should be
moved down anyway.  It's up to you if you want to suggest special
status for _sre.c...

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