"M.-A. Lemburg" <mal@lemburg.com>: > Nested scopes will introduce cycles in all frame objects. It doesn't have to be that way. A static link is only needed if a function actually uses any variables from an outer scope. In the majority of cases, it won't. And it's possible to do even better than that. You can separate out variables referred to in an inner scope and store them separately from the rests of the frame, so you only keep what's really needed alive. > This means that with GC turned off, frame objects will live > forever Don't allow GC to be turned off, then! (Presumably this feature would only be considered once GC has become a permanent feature of Python.) > BTW, Python's GC only works for a few builtin types (frames > are not among the supported types) But they could become so if necessary, surely? Greg Ewing, Computer Science Dept, +--------------------------------------+ University of Canterbury, | A citizen of NewZealandCorp, a | Christchurch, New Zealand | wholly-owned subsidiary of USA Inc. | greg@cosc.canterbury.ac.nz +--------------------------------------+
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4