Antoine Pitrou <pit...@free.fr> added the comment: > Making a copy of f_locals values to return a dictionary that doesn't > hold references to the locals of the frame is not that simple
I think you misunderstood the bug report. The issue here is not that locals are referenced from the dict, it's that the dict is kept alive (since it is cached) longer that it should. By the way, reading the discussion again, I think we could simply make dicts weak-referenceable. A dict is already quite big in memory and I don't think adding a pointer to the struct would make a significant difference. ---------- nosy: +gvanrossum, rhettinger _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue6116> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com