More explicitly:

sage: var('y')
y
sage: type(y)
<type 'sage.symbolic.expression.Expression'>
sage: from sage.calculus.calculus import *
sage: var('z')
z
sage: type(z)
---------------------------------------------------------------------------
<snip>
NameError: name 'z' is not defined

Huh.  Can I ask where one would import * from sage.calculus.calculus?
Though I also don't think this is good.

Also, one sees various imports of this.  I feel like messing with this
is asking for trouble, but there are a lot of different things done
here.

calculus/all.py:16:from var import (var, function, clear_vars)
functions/piecewise.py:83:from sage.calculus.all import var
symbolic/ring.pyx:766:        sage: from sage.symbolic.ring import var
tensor/coordinate_patch.py:46:from sage.symbolic.ring import SR, var
tensor/differential_forms.py:46:from sage.symbolic.ring import SR, var
calculus/calculus.py:370:from sage.symbolic.ring import var, SR,
is_SymbolicVariable
calculus/desolvers.py:1187:        from sage.calculus.var import var
calculus/desolvers.py:1493:            from sage.symbolic.ring import
var
calculus/predefined.py:1:from sage.symbolic.ring import var as _var


On Jan 18, 4:59 am, Jean-Pierre Flori <[email protected]> wrote:
> When "from sage.calculus.calculus import *" is executed, the default
> var() function from sage.calculus.var (L4) gets replaced by another
> one from sage.symbolic.ring (L506).
>
> There is indeed an import made in sage.calculus.calculus (L370).
>
> However, the behavior of var() changes afterward because when var('n')
> is called, the symbolic variable n is not automatically created.
>
> So the following lines are valid before, but not after calling "from
> sage.calculus.calculus import *":
>
> sage: var('n')
> sage: n
>
> Is this normal or should a ticket be opened ?
>
> Cheers,
> JP

-- 
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/sage-support
URL: http://www.sagemath.org

Reply via email to