[Python-Dev] Issue 10194 - Adding a gc.remap() function (original) (raw)

Neil Schemenauer nas at arctrix.com
Tue Oct 26 23:45:19 CEST 2010


Peter Ingebretson <pingebre at yahoo.com> wrote:

I am happy to write up a PEP for this feature. I'll start that process now, though if anyone feels that this idea has no chance of acceptance please let me know.

I think a feature that allows modules to be more reliability reloaded could be accepted. Martin's suggestion sounds like it could be useful. I would recommend trying to limit the scope of the feature and clearly define what it intends to achieve (e.g. use cases).

The idea of replacing references does not seem to have much hope, IMHO. It presents all kinds of subtle problems. Dictionary hashing is only one of many invariants that could be broken by blindly replacing references. You have no way of knowing what other invariants are expected or if the new objects will satisfy them.

Also, there would have to be a very compelling reason to change to the signature of "visitproc". Every Python module that participates in GC would have to be modified as a result of the signature change.

Regards,

Neil



More information about the Python-Dev mailing list