On Wed, Aug 31, 2011 at 9:43 AM, Martin Albrecht
<[email protected]> wrote:
> Hi,
>
> at
>
>    http://trac.sagemath.org/sage_trac/ticket/11764
>
> Paul Zimmermann writes:
>
> """
> for univariate polynomials we have the class Polynomial:
>
> sage: R.<x> = QQ[]
> sage: isinstance(x+1, Polynomial)
> True
> However for multivariate polynomials we have to write:
>
> sage: R.<x,y> = QQ[]
> sage: isinstance(x+y, sage.rings.polynomial.multi_polynomial.MPolynomial)
> True
> I suggest MPolynomial is defined as an alias for
> sage.rings.polynomial.multi_polynomial.MPolynomial so that we can
> simply write:
>
> sage: R.<x,y> = QQ[]
> sage: isinstance(x+y, MPolynomial)
> True
> """
>
> I suggested this needs a discussion on [sage-devel] because it's about
> adding *more* stuff to the global namespace, while we try to keep that
> to a minimum.

Random Thoughts:  Since we banned using "is_MPolynomial", and we do
have Polynomial in the global namespace, I can't see an alternative to
having MPolynomial.  That said, it's perhaps bad that we have
Polynomial in the global namespace.   I wonder how many people have
done:

sage: Polynomial(2)
boom!
sage: Polynomial([1,2,3])
boom!
sage: Polynomial(QQ,[1,2,3])
boom!
sage: Polynomial?
pages, with nothing about how to make a polynomial using "the
Polynomial command"...

 -- William

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

Reply via email to