[Pythonmac-SIG] changging inheritance on the fly?

Chris Barker Chris.Barker at noaa.gov
Mon Apr 18 08:53:55 CEST 2005


altern wrote:
> Michael Hudson wrote:
>> The way you ask the question suggests you don't know Python especially
>> well.  As Bob says, there are likely better ways to acheive your goal.
> 
> any tips about those other ways?

A) this is more of a topic for comp.lang.python, but as long s we're here...

B) We can't help you without knowing what it is you're trying to do. No 
one needs to "change the base class of a class" for it's own sake. 
Clearly, you have something you need to accomplich, and you thought that 
might be a way to do it. If you tell us what you need to accomplish, we 
might be able to suggest a way to do it.

C) just guessing, but maybe what you want is a factory function, which 
will create the class you need on the fly. A search for "factory" and 
python should get you something.


-Chris


More information about the Pythonmac-SIG mailing list