Hi all, I just hit this zinger:
{{{ sage: polygen(GF(49, 'a')) ; polygen(GF(9, 'a')) x x sage: x = polygen(GF(49, 'a')) sage: -x 2*x sage: x + 0 x sage: -x 6*x }}} This is definitely still present in sage-4.5 (at least, William tried it on his laptop and said he hit it). The underlying issue is one of NTL context restoration -- I posted the details (at least as far as I had time to check them) to this ticket: http://trac.sagemath.org/sage_trac/ticket/9524 I'll try and look at this, but unfortunately it won't be soon. If Martin or Robert (who hg blame tells me wrote the polynomial_template stuff) want to take a look, that would be good. In particular, if you go into sage/libs/ntl/ntl_ZZ_pEX.pyx, there's a clear description in __cinit__ of what you *don't* want to do (thank you David Roe!). Unfortunately, the generated code from sage/rings/polynomial_zz_pex (which uses polynomial_template.pxi) does exactly what David says to avoid. I'm not sure what the best fix is -- maybe a second template that uses a _new-based object creation pattern instead of a PY_NEW- based one? (Having never actually looked at the polynomial_template code, I'm clearly just spitballing.) For the curious, this was the last bug I hit in getting Sage-4.4.4 to build, run, and pass all doctests against cython-closures tip. Cython 0.13 with closures, here we come. -cc (PS I generally only read this list via the web interface -- feel free to keep me cc'd on this thread.) -- 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