id summary reporter owner description type status priority milestone component resolution keywords cc merged author reviewer upstream work_issues branch commit dependencies stopgaps
9989 easier access to operands of a symbolic expression burcin burcin "Attached patch adds an `op` attribute to symbolic expressions which gives easy access to its operands. We now have:
{{{
sage: x,y,z = var('x,y,z')
sage: e = x + x*y + z^y + 3*y*z; e
x*y + 3*y*z + z^y + x
sage: e.op[1]
3*y*z
sage: e.op[1,1]
z
sage: e.op[-1]
x
sage: e.op[1:]
[3*y*z, z^y, x]
}}}
Using `__getitem__()` directly was not an option since it breaks conversion to numpy.
Apply [attachment:trac_9989-operands.take4.patch]" enhancement closed major sage-4.7.1 symbolics fixed sd31 jpflori sage-4.7.1.alpha4 Burcin Erocal Robert Bradshaw, Karl-Dieter Crisman, Volker Braun N/A