On Mon, Oct 20, 2008 at 3:21 PM, David R. Kohel <[EMAIL PROTECTED]> wrote:
> Hi William,
>
>> Have you seen this: http://trac.sagemath.org/sage_trac/ticket/4322
>
> No, actually I didn't get an e-mail about it.  This can be reduced to
> a crash in the follow example:
>
> sage: P.<X,Y> = PolynomialRing(ZZ,2)
> sage: P(sage.rings.polynomial.polydict.PolyDict({(1,0):1,(0,1):-1}))
> X - Y
>
> Do you know if
>   (1) this is a bug in the coercion model, or
>   (2) I am using access to the internal representation which is not
>       intended to be accessed (and subject to change)?

I don't know.  I'm taking this on sage-devel, since somebody
there will probably "just know", whereas I would have to dive
into the code for a while to figure it out.

The code above in sage-3.1.4 does this:

sage: P.<X,Y> = PolynomialRing(ZZ,2)
sage:  P(sage.rings.polynomial.polydict.PolyDict({(1,0):1,(0,1):-1}))
<string>:1: Warning: 'with' will become a reserved keyword in Python 2.6
ERROR: An unexpected error occurred while tokenizing input
The following traceback may be corrupted or invalid
The error message is: ('EOF in multi-line statement', (1010, 0))

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)

/home/was/www/papers/talks/<ipython console> in <module>()

/home/was/s/local/lib/python2.5/site-packages/sage/rings/polynomial/multi_polynomial_libsingular.so
in 
sage.rings.polynomial.multi_polynomial_libsingular.MPolynomialRing_libsingular.__call__
(sage/rings/polynomial/multi_polynomial_libsingular.cpp:6996)()

/home/was/s/local/lib/python2.5/site-packages/sage/structure/parent.so
in sage.structure.parent.Parent.__call__
(sage/structure/parent.c:3732)()

/home/was/s/local/lib/python2.5/site-packages/sage/structure/parent.so
in sage.structure.parent.__call__ (sage/structure/parent.c:3619)()

/home/was/s/local/lib/python2.5/site-packages/sage/structure/coerce_maps.so
in sage.structure.coerce_maps.DefaultConvertMap_unique._call_
(sage/structure/coerce_maps.c:2622)()

/home/was/s/local/lib/python2.5/site-packages/sage/structure/coerce_maps.so
in sage.structure.coerce_maps._call_
(sage/structure/coerce_maps.c:2537)()

/home/was/s/local/lib/python2.5/site-packages/sage/rings/integer.so in
sage.rings.integer.Integer.__init__ (sage/rings/integer.c:5688)()

TypeError: unable to coerce <type
'sage.rings.polynomial.polydict.PolyDict'> to an integer
sage:

William

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to