On Mon, 04 Mar 2013 at 01:36PM -0800, luisfe wrote:

> {{{
> sage: t=(1,2,3)
> sage: type(t)
> tuple
> sage: len(t)
> 3
> sage: len(t)=4
> sage: t
> t
> sage: type(t)
> sage.symbolic.expression.Expression
> }}}

Looks like some of our preparsing to make symbolic stuff work nicer: try this:

f(t) = sin(t)^2 + 2

which automatically does "var('t')". You are defining a symbolic
function called "len" which takes one variable, and the function is
constant (4).

Should our preparser reject reserved Python keywords? The current
behavior strikes me as strange and unexpected.

Dan

--
---  Dan Drake
-----  http://math.pugetsound.edu/~ddrake
-------

Attachment: signature.asc
Description: Digital signature

Reply via email to