[Python-Dev] gc.garbage

Neil Schemenauer nas@python.ca
Mon, 26 Nov 2001 14:21:26 -0800


Tim Peters wrote:
> I notice the gc docs say:
> 
>     The following variable is provided for read-only access:
>                                            ^^^^^^^^^^^^^^^^
>     garbage
>         A list of objects which the collector found to be unreachable ...
> 
> This isn't clear to me.

It's not clear because it's nonsense.  I think I mean to say something
about the gc.garbage binding.  If you do something like:

    gc.garbage = "ha ha"

then the list is garbage is forever inaccessible from within Python.  Is
there some way to prevent people from assigning to certain module
variables?  That would be the correct way to fix it, IMHO.

  Neil