> Hi,
> Do you know how in Python one can tell if an object
> is a SAGE object without using isinstance method?

Maybe, didn't thought about it - why isn't isinstance sufficient enough?

> Do SAGE objects have something specific that could
> be useful for that, eg some naming convention,
> some structure, anything?

They do - but those, that apply to SymPy are mainly in sage.calculus.
And those are kind of too complex, because they use Maxima as a
backend for all the calculations.
That's why it is interesting to have SymPy in SAGE, to have a nice
clean calculus, even though currently slower than Maxima. But this
could change in the future, by using Cython, or C/C++. BTW, I myself
also prefer C to C++, if we know exactly what we want and how to do it
(which we don't yet). Because if we ever decide to use C/C++, we
should really make it as fast as possible, and C is I think better for
that.

> This info would be needed in sympify. Plain str(<sageobejct>)
> approach is not robust enough as also other arbitrary
> objects are converted to string in this way and make
> catching invalid inputs to sympify difficult.


Agree. The way to do this in SAGE is to implement _sympy_() methods,
that's what I am going to do now.

Ondrej

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sympy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to