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

2010-08-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: Hmm, I was under the impression that C extensions could set properties (or special members) on modules, but they can't. This makes this issue too hard to solve compared to the expected benefit. -- resolution: -> rejected status: open -> closed _

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

2010-08-04 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- keywords: +easy ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pytho

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

2010-08-04 Thread Antoine Pitrou
New submission from Antoine Pitrou : 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