Guido van Rossum 758eec0172 Rewritten PyImport_Cleanup() and its helper, clear_carefully(). They
now implement the following finalization strategy.

1. Whenever this code deletes a module, its directory is cleared
   carefully, as follows:
   - set all names to None that begin with exactly one underscore
   - set all names to None that don't begin with two underscores
   - clear the directory

2. Modules are deleted in the following order:
   - modules with a reference count of 1, except __builtin__ or __sys__
   - repeat until no more are found with a reference count of 1
   - __main__ if it's still there
   - all remaining modules except __builtin__ or sys
   - sys
   _ __builtin__
1998-01-19 21:58:26 +00:00
..
1996-10-25 14:44:06 +00:00
1994-08-29 10:43:12 +00:00
1996-10-25 14:44:06 +00:00
1997-07-19 19:48:41 +00:00
1996-10-25 14:44:06 +00:00
1997-09-05 07:33:22 +00:00
1997-07-19 19:48:41 +00:00
1997-07-19 19:48:41 +00:00
1997-05-07 23:51:07 +00:00
1996-08-29 18:10:41 +00:00
1997-09-05 07:33:22 +00:00
1996-08-29 18:10:30 +00:00
1996-08-19 22:12:39 +00:00
1997-11-22 21:53:48 +00:00
1997-11-22 21:53:48 +00:00