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-January/070706.html below:

[Python-Dev] Problem between deallocation of modules and func_globals

[Python-Dev] Problem between deallocation of modules and func_globals [Python-Dev] Problem between deallocation of modules and func_globals"Martin v. Löwis" martin at v.loewis.de
Sat Jan 20 00:55:07 CET 2007
Josiah Carlson schrieb:
> I was saying that it would be nice if the following were true:
> 
>     >>> encodings.__module__
>     <module 'encodings' from 'C:\python25\lib\encodings\__init__.pyc'>

Ah, ok. It would be somewhat confusing, though, that __module__ is
sometimes a module object, and sometimes a string (it certainly confused
me).

> So what if it is a circular reference (module references dict which
> references module), we've got a GC which handles cycles just fine (when
> users try not to be too smart).

That remains to be seen in practice. Currently, modules are explicitly
cleared at shutdown. I think any cycle with an object implementing
__del__ will keep loads of modules alive, noncollectable for GC.

Regards,
Martin
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