Hi Burcin,

On 25 Okt., 15:26, Burcin Erocal <bur...@erocal.org> wrote:
> This initializes a list with a single element for objects which return
> None for operator() now. IMHO, this approach is inefficient. In this
> case, you should act on the object directly.

I didnt claim that it was efficient - my code was intended to be a
work-around to achieve what the OP was asking.
Directly acting on the Ginac interface, as you suggest below, is
certainly a better way.

And as I stated in my PS, I wouldn't insist on introducing an identity
operator. After all, a case distinction between leaves and non-leaves
in an expression tree can hardly be avoided.

> In any case, we should wrap the following ginac interfaces to provide a
> better way of doing this:
>
>  * A way to apply a function to the operands of an expression:
>
> http://www.ginac.de/tutorial/Applying-a-function-on-subexpressions.html
>
>  * or tree traversal:
>
> http://www.ginac.de/tutorial/Visitors-and-tree-traversal.html

+1

Cheers,
Simon

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to