On Friday 12 October 2007 12:04, William Stein wrote:
> sage: P.=ZZ[]
> sage: f = x/y
> sage: f.subs({f.parent().gen(0):5})
> 5/y
>
> The problem is that subs is not textually comparing variables
> but actually comparing objects -- f.parent().gen(0) prints as
> "x", but it is *not* the x of f.pare
On 10/12/07, Joel B. Mohler <[EMAIL PROTECTED]> wrote:
>
> Sorry for the continued barrage of silly questions. It's my day to go through
> sage gotcha's I'd accumulated.
Excellent!!
> Why doesn't this next substitution result in 5/y?
>
> sage: P.=ZZ[]
> sage: (x/y).subs({x:5}) # this should be
On Oct 12, 8:47 am, "Joel B. Mohler" <[EMAIL PROTECTED]> wrote:
> Sorry for the continued barrage of silly questions. It's my day to go through
> sage gotcha's I'd accumulated.
>
> Why doesn't this next substitution result in 5/y?
>
> sage: P.=ZZ[]
> sage: (x/y).subs({x:5}) # this should be 5/y