Subject: [Ufl] Slightly confusing behaviour change

From: Martin Sandve Alnæs <[email-masked]>
Date: Fri, 30 Nov 2012 15:13:27 +0100

This shouldn't affect users, but here's a slightly confusing behaviour that
has to be this way.

Comparing a UFL scalar value to a python scalar value will compare the
values using standard python rules:

In [3]: as_ufl(1) == 1
Out[3]: True

In [4]: as_ufl(1) == 1.0
Out[4]: True

In [5]: as_ufl(1.0) == 1.0
Out[5]: True

In [6]: as_ufl(1.0) == 1
Out[6]: True

Comparing two UFL scalar values will include their type:

In [7]: as_ufl(1.0) == as_ufl(1)
Out[7]: False

Martin