[Python-Dev] Re: Cuddly constants seek loving, stable home
Fred L. Drake, Jr.
Thu, 23 Aug 2001 11:03:20 -0400 (EDT)
Guido van Rossum writes:
> +0. It's the better solution but I bet it's more work to code it than
> _sysconst. I'm not volunteering, and I want Tim to have time to help
> with the type/class unification, which is behind schedule.
One interesting thing about these modules is that the executable C
code is no longer needed once the modules has been initialized
(similar to the code object for a module; it creates things and then
goes away). Perhaps there should be a C equivalent.
When the shared-object importer loads a .so/.dll/.pyd, it looks for
init<module> and calls that, and then keeps the object loaded.
Perhaps a second name could be checked for, build<module>, which
indicates that the initialized module has no dependencies on the C
code, which which case the .so/.dll/.pyd gets unloaded after the
Another possibility is to simply regenerate token.py and symbol.py
whenever token.h and graminit.h change. That can be driven by make so
they don't fall out of sync with the rest of the grammar.
Fred L. Drake, Jr. <fdrake at acm.org>
PythonLabs at Zope Corporation