A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2003-June/036386.html below:

[Python-Dev] Details on Python shutting down

[Python-Dev] Details on Python shutting downBrett C. drifty@alum.berkeley.edu
Sun, 15 Jun 2003 23:24:11 -0700
On bug #754449 I suspected something was being set to None by a person's 
app and ended up writing a trace function to catch when that happened. 
Time then stepped in and pointed out that the OP said when Python was 
shutting down and that globals are set to None during tear down which 
would explain the behavior.  He suggested I move this over to python-dev.

So, what exactly does Python do during shutdown?  I assume all objects 
get cleaned up and have their __del__ methods called if they have them. 
  Tim mentioned in the patch that Python "systematically sets 
module-global bindings to None".  So I assume this means that 
referencing *any* globals during shutdown just doesn't work since it 
might be None (which makes sense in the case of this bug report).  Is 
there any specific order to this teardown?  I remember Tim saying that 
in __del__ methods you had to have locally bound anything you needed to 
call since otherwise it could be gone when you need it.

Any words of wisdom here would be greatly appreciated.

-Brett




RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4