> > > Alternatively, to GC or not GC could be driven by > > > inheritance. I used that in my flextype implementation. > > > When a class inherits from no GC-ed anchestors only, > > > it doesn't install GC as well. > > > > That's a fine idea. It would require that there were two standard > > base classes: object and gcobject. Or better, object and nogcobject; > > I think that GC should still be the default for classes that have any > > instance variables at all. > > Could metaclasses be used instead of inheritance? It's just that I feel > quite uncomfortable already with the `inheritance from an object', and > now if there'll be two root objects... I'd be more uncomfortable with with more use of metaclasses. > What would be the relationship between these two objects? Is a > gcobject an object, or are they both subclasses of an archobject? object (with GC) would be a subclass of nogcobject (the real root root). At the C level, PyBaseObject_Type would become nogcobject and a new name would be chosen for object, maybe PyGCObject_Type. --Guido van Rossum (home page: http://www.python.org/~guido/)
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