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/2007-May/073396.html below:

[Python-Dev] Module cleanup improvement

[Python-Dev] Module cleanup improvementTim Peters tim.peters at gmail.com
Wed May 23 00:41:30 CEST 2007
[Armin Rigo]
> On another level, would there be interest here for me to revive my old
> attempt at throwing away this messy procedure, which only made sense in
> a world where reference cycles couldn't be broken?

Definitely.

> Nowadays the fact that global variables suddenly become None when the
> interpreter shuts down is a known recipe for getting obscure messages from
> still-running threads, for example.
>
> This has one consequence that I can think about: if we consider a
> CPython in which the cycle GC has been disabled by the user, then many
> __del__'s would not be called any more at interpreter shutdown.  Do we
> care?

I don't believe this is a potential issue in CPython.  The
user-exposed gc.enable() / gc.disable() only affect "automatic" cyclic
gc -- they flip a flag that has no bearing on whether an /explicit/
call to gc.collect() will try to collect trash (it will, unless a
collection is already in progress, & regardless of the state of the
"enabled" flag).  Py_Finalize() calls the C spelling of gc.collect()
(PyGC_Collect), and I don't believe that can be user-disabled.
More information about the Python-Dev mailing list

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