[Python-Dev] Global variable access schemes

Ka-Ping Yee ping@lfw.org
Wed, 20 Feb 2002 06:40:49 -0600 (CST)


I've added diagrams for Guido's more recent proposal, and
summarized everything on a web page:

    http://lfw.org/python/globals.html

Check out http://lfw.org/python/guido2a.gif and
http://lfw.org/python/guido2b.gif.

About Guido2:

    - I renamed some things -- globals_vector is a structure,
      not a vector, so i put it in md_cache and used the
      prefix mc_ for its fields.

    - When you del a module variable, do you just go through
      all of mc_names to find the entry to invalidate?
      (I suppose if you sort mc_names you can binary search.)

    - It should be possible to add entries in the cache for
      attributes in other modules, too, right?  If we assume
      that varibles don't get deleted often, it should pay off.

Haven't heard anything from anybody about this topic in a while.
Has anyone been thinking about it?


-- ?!ng