[issue9505] User code should not be able to rebind gc.garbage

Antoine Pitrou report at bugs.python.org
Wed Aug 4 12:25:16 CEST 2010


New submission from Antoine Pitrou <pitrou at free.fr>:

User code is currently allowed to rebind the gc.garbage attribute, while the "real" garbage list in the GC module actually remains the same. This is counter-intuitive and allows to write apparently correct code such as:

    gc.garbage = []

while it should really be:

    gc.garbage[:] = []

----------
components: Library (Lib)
messages: 112785
nosy: pitrou, tim_one
priority: normal
severity: normal
stage: needs patch
status: open
title: User code should not be able to rebind gc.garbage
type: behavior
versions: Python 3.2

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue9505>
_______________________________________


More information about the Python-bugs-list mailing list