Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How come `abs(x)` works?

Hello,

I notice that abs is a Python built-in function, but it also works symbolically:

sage: abs(x)
abs(x)
sage: bool(abs(x) == abs_symbolic(x))
True
sage: preparse('abs(x)')
'abs(x)'

What's going on here? Obviously the Python function should not accept a Sage type.

How come `abs(x)` abs(x) works?

Hello,

I notice that abs is a Python built-in function, but it also works symbolically:

sage: abs(x)
abs(x)
sage: bool(abs(x) == abs_symbolic(x))
True
sage: preparse('abs(x)')
'abs(x)'

What's going on here? Obviously the Python function should not accept a Sage type.