[Python-Dev] deja-vu .. python locking

"Martin v. Löwis" martin at v.loewis.de
Wed Sep 20 08:33:38 CEST 2006

Martin Devera schrieb:
> Just from curiosity, would be a big problem removing refcounting and live
> with garbage collection only ? I'm not sure if some parts of py code
> depends on exact refcnt behaviour (I guess it should not).

Now, this gives a true deja-vu. Python applications often rely on
reference counting (in particular, that releasing a file object
will immediately close the file), despite the language reference
saying that this is not a Python feature, just one of the
implementation. In addition, implementing a tracing garbage
collection would either be tedious or have additional consequences
on semantics: with a conservative GC, some objects may never
get collected, with a precise GC, you have to declare GC roots
on the C level. Things get more complicated if the GC is also
compacting. See the current thread on the py3k list.


More information about the Python-Dev mailing list