[Python-Dev] Re: Cuddly constants seek loving, stable home

Greg Stein gstein@lyra.org
Thu, 23 Aug 2001 07:03:00 -0700

On Thu, Aug 23, 2001 at 01:37:51AM -0700, Ka-Ping Yee wrote:
> On Thu, 23 Aug 2001, Tim Peters wrote:
> > So I propose a new builtin module, _sysconsts.  The underscore is to
> > announce its obscure internal nature.  I propose only to expose the CO_xxx
> > #defines at the start, but of course others could be added.
> Just a suggestion, but how about sys.consts?  Like os.path, as in
> sys.consts.CO_NESTED, sys.consts.CO_FUTURE_DIVISION, etc.  So there's
> only one new object in sys, and it can contain the weird internal stuff. :)


-0 on a new module. Just make sys.consts some kind of attributed object.

> Hmm, as a side thought, perhaps keywords and tokens should go here too
> (sys.keywords, sys.tokens) instead of having to keep separate .py files
> in sync with the interpreter core.

+1 ... Good call. That would toss some of the synchronization problems with
those files today.


Greg Stein, http://www.lyra.org/