[wingide-users] Enumerating instances of a class
tms at zeetix.com
Sun Mar 21 16:45:29 MDT 2010
Anybody know how to enumerate the instances of a Python class?
The Smalltalk equivalent, on any Smalltalk "Behavior" instance (any
class or Metaclass), is "allInstances". It is implemented as a
primitive; the underlying VM traverses the active object space
collecting objects whose class pointer matches the class in question.
I'm hoping that there's some kind of builtin method that does the same
in Python. I *really* don't want to have to extend Python myself.
Tom Stambaugh, Founder
27 Auburn Street
Brookline, MA 02446
More information about the wingide-users