> > > > The idea is that when you have a NewClass instance, calling > "newobject.foo" will automatically call the descriptor's __getmethod__, > passing it the class and instance. That descriptor will create and > populate the FooClass instance, which does the real work. > > Descriptors are how methods, classmethods, staticmethods and properties > work, so they are a fundamental, powerful way of implementing things like > this. >
Thanks for the suggestion Steven. Hopefully my last email on the subject helped explain the intention a little better. I'll look into descriptors some more. I had the feeling I needed to use one (or more) of the following: descriptors decorators metaclasses None of which I know much about yet. I will do some reading & test out your suggestion. Thanks again.
-- https://mail.python.org/mailman/listinfo/python-list