]> granicus.if.org Git - python/commit
New rules for deleting modules. Rather than having an elaborate
authorGuido van Rossum <guido@python.org>
Tue, 5 Aug 1997 02:20:51 +0000 (02:20 +0000)
committerGuido van Rossum <guido@python.org>
Tue, 5 Aug 1997 02:20:51 +0000 (02:20 +0000)
commit085d269f1d91bcbe051ee423089230dd072d1cc4
treef8e79ecc49ed0e88f1bfa37f54001b83cd54c071
parentf9c90c533e5b7db1b797cd7c07f6e5d4a004fdf6
New rules for deleting modules.  Rather than having an elaborate
scheme based on object's types, have a simple two-phase scheme based
on object's *names*:

/* To make the execution order of destructors for global
   objects a bit more predictable, we first zap all objects
   whose name starts with a single underscore, before we clear
   the entire dictionary.  We zap them by replacing them with
   None, rather than deleting them from the dictionary, to
   avoid rehashing the dictionary (to some extent). */
Python/import.c