Robert Dailey a écrit :
Hey,
I have a class that I want to have a different base class depending on
a parameter that I pass to its __init__method. For example
(pseudocode):
class MyDerived( self.base ):
def __init__( self, base ):
self.base = base
Something like that... and then I would
> Robert Dailey (RD) wrote:
>RD> Hey,
>RD> I have a class that I want to have a different base class depending on
>RD> a parameter that I pass to its __init__method. For example
>RD> (pseudocode):
>RD> class MyDerived( self.base ):
>RD> def __init__( self, base ):
>RD> self.base = base
On Sat, 08 Aug 2009 11:12:30 -0600, Robert Dailey
wrote:
How can you subclass a class from an object?..
Hey,
I have a class that I want to have a different base class depending on
a parameter that I pass to its __init__method. For example
(pseudocode):
class MyDerived( self.base ):
def _
On Aug 8, 12:13 pm, Luis Alberto Zarrabeitia Gomez
wrote:
> Quoting Robert Dailey :
>
> > Hey,
>
> > I have a class that I want to have a different base class depending on
> > a parameter that I pass to its __init__method. For example
> > (pseudocode):
>
> 1- Are you sure that you want that behavi
Quoting Robert Dailey :
> Hey,
>
> I have a class that I want to have a different base class depending on
> a parameter that I pass to its __init__method. For example
> (pseudocode):
1- Are you sure that you want that behavior? Given that in python, a class is
just a particular case of invocabl
Robert Dailey wrote:
Hey,
I have a class that I want to have a different base class depending on
a parameter that I pass to its __init__method. For example
(pseudocode):
class MyDerived( self.base ):
def __init__( self, base ):
self.base = base
Something like that... and then I would do
Hey,
I have a class that I want to have a different base class depending on
a parameter that I pass to its __init__method. For example
(pseudocode):
class MyDerived( self.base ):
def __init__( self, base ):
self.base = base
Something like that... and then I would do this:
foo = MyDerived