On 16 feb, 08:40, alex23 <wuwe...@gmail.com> wrote:
> On Feb 16, 6:16 pm, Joan Miller <pelok...@gmail.com> 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.bar
>   2
Yes! It solves the problem :) Thanks!
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to