[wingide-users] Enumerating instances of a class
Tom Stambaugh
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.
Thx,
Tom
--
Tom Stambaugh, Founder
Zeetix LLC/ZeeGuide/ZeeForge
27 Auburn Street
Brookline, MA 02446
617-734-8934 (land)
617-721-0446 (cell)
More information about the wingide-users
mailing list