No, you can't do that. Consider moving shared code to a standalone function
instead.

Martin


On 23 May 2014 11:43, Miroslav Kuchta <[email protected]> wrote:

>  Hi,
>
> I have a question about deriving from user-defined expressions in Python.
> Consider
>
> class A(Expression):
>    def eval(self, values, x):
>        pass
>
> class B(A):
>    def eval(self, value, x):
>        pass
>
>
> Running the snippet produces ValueError when ExpressionMetaClass is trying
> to remove Expression from bases of B. So it seems inheritance is not
> possible.
> Are there some tricks to make the example work? Thanks.
>
> Regards, Miro
>
>
>
> _______________________________________________
> fenics mailing list
> [email protected]
> http://fenicsproject.org/mailman/listinfo/fenics
>
>
_______________________________________________
fenics mailing list
[email protected]
http://fenicsproject.org/mailman/listinfo/fenics

Reply via email to