[Python-Dev] Cycle collection enhancement idea (original) (raw)
eyal.lotem+pyutils@gmail.com eyal.lotem at gmail.com
Sun Jun 29 13:33:28 CEST 2008
- Previous message: [Python-Dev] Cycle collection enhancement idea
- Next message: [Python-Dev] Cycle collection enhancement idea
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Jun 29, 7:52 am, "Guido van Rossum" <gu... at python.org> wrote:
On Sat, Jun 28, 2008 at 5:39 PM, Greg Ewing <greg.ew... at canterbury.ac.nz> wrote: > Nick Coghlan wrote:
>> It's a fact of Python development: del methods cannot safely reference >> module globals, because those globals may be gone by the time that method is >> invoked. > Speaking of this, has there been any more thought given > to the idea of dropping the module clearing and just > relying on cyclic GC? No, but it is an intriguing thought nevertheless. The module clearing causes nothing but trouble... This is exactly what my post tried to address. I assumed it was clear that module clearing is the wrong solution, and that it was also clear that due to the cycles I mentioned (global.class.dict['any_method'].func_globals['global'] is global), all globals that have a del will not be collectible. Therefore, I proposed a solution to cycles with a del in them. Only with this solution it is possible to replace module clearing with normal garbage collection.
Eyal
-- --Guido van Rossum (home page:http://www.python.org/~guido/)
Python-Dev mailing list Python-... at python.orghttp://mail.python.org/mailman/listinfo/python-dev Unsubscribe:http://mail.python.org/mailman/options/python-dev/python-dev2-garchiv...
- Previous message: [Python-Dev] Cycle collection enhancement idea
- Next message: [Python-Dev] Cycle collection enhancement idea
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]