Help creating new module which inherits existing class from another module.

Jonno jonnojohnson at gmail.com
Wed Feb 19 11:11:16 EST 2014


>
>
>
> 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20140219/039a2bac/attachment.html>


More information about the Python-list mailing list