On Nov 28, 3:14 pm, Mike Hansen <mhan...@gmail.com> wrote:
> On Sun, Nov 28, 2010 at 3:09 PM, John H Palmieri <jhpalmier...@gmail.com> 
> wrote:
>
> > I think it's this code in sage/rings/polynomial/
> > multi_polynomial_ring_generic.pyx:
>
> >    def __contains__(self, x):
> >        """
> >        This definition of containment does not involve a natural
> >        inclusion from rings with less variables into rings with more.
> >        """
> >        try:
> >            return x.parent() == self
> >        except AttributeError:
> >            return False
>
> I think this code should be removed in favor of the default implementation.
>
> --Mike

That looks okay to me.  I don't know why "This definition of
containment does not involve...", but if you delete the code, then

  sage: A1.<a> = PolynomialRing(QQ)
  sage: A2.<a,b> = PolynomialRing(QQ)
  sage: A1(a) in A2
  True

I don't know if the original implementers didn't want this sort of
containment, but deleting the code will change this behavior.

--
John

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to