Joan Miller writes:
> Is possible to get a third class with the class variables of another
> two classes?
Multiple inheritance is allowed in Python:
class Baz(Foo, Bar):
pass
However, it leads to complications that you likely don't want, e.g.
http://www.artima.com/weblogs/viewpost.
On 16 feb, 08:40, alex23 wrote:
> On Feb 16, 6:16 pm, Joan Miller wrote:
>
> > Is possible to get a third class with the class variables of another
> > two classes?
>
> >
> > class A:
> > foo = 1
>
> > class B:
> > bar = 2
> >
>
> Through multiple inheritance?
>
> >>>
On Feb 16, 6:16 pm, Joan Miller wrote:
> Is possible to get a third class with the class variables of another
> two classes?
>
>
> class A:
> foo = 1
>
> class B:
> bar = 2
>
Through multiple inheritance?
>>> class C(A, B):
... pass
...
>>> C.foo
1
>>> C.b