Antoine Pitrou <pit...@free.fr> added the comment: > - gc.callbacks is a simple module attribute. Anyone can set it to > anything else, e.g. gc.callbacks=None. We have to accomodate this > possibility or else introduce annoying api functions to edit the list. > I thought it best to do things similarly to sys.import_hooks etc, > simply expose a list object and trust the user to treat this list > object with care, but check it regardless to avoid crashing.
The way I read it, you don't fetch it from the module dictionary, though, you just use the static C variable, which shouldn't change when the dict is mutated. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue10576> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com