| 1 | initial version |
Hi as far as I understand the problem is that oo so on are symbolic expressios. If you try to compare them with == sage returns as a new symbolic expression the symbolic equationion:
var('x,y')
print x==y
print type(x==y)
returns
x == y
<type 'sage.symbolic.expression.Expression'>
A soultion seems to be to cast the symbolic equation to a boolean:
print bool(x==y)
print bool(x==x)
which returns
False
True
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.