Question about instance creation
r.barendregt at village.uunet.be
Mon Mar 20 23:58:57 CET 2000
"Gordon McMillan" <gmcm at hypernet.com> wrote:
>So, I haven't the foggiest idea *what* you're trying to do.
>However, this might help clarify things.
My apologies. I'll try to be more precise (the example didn't
illustrate well what I wanted to do):
I have a derived class that I want to make instances of. I want to be
able to change the base class (hence the alias) and I can't just
create an instance of the base class and forget all about the derived
class, because the derived class inherits from another class as well.
So the derived class instance acts like a base class instance with the
extra functionality as defined in the other class. The def looks like
class DerivedClass(BaseClassAlias, SomeOtherClass):
I do not even know if I'm searching in the right direction to get to
above mentioned result. I guess I could change the base class alias
and then directly instantiate the derived class. Any other ideas?
More information about the Python-list