#20086: ZZ[X], QQ[X]: allow arbitrary powers of constant polynomials
-------------------------------------+-------------------------------------
       Reporter:  cheuberg           |        Owner:
           Type:  defect             |       Status:  needs_review
       Priority:  major              |    Milestone:  sage-7.1
      Component:  basic arithmetic   |   Resolution:
       Keywords:                     |    Merged in:
        Authors:  Clemens Heuberger  |    Reviewers:  Benjamin Hackl
Report Upstream:  N/A                |  Work issues:
         Branch:                     |       Commit:
  u/cheuberg/polynomials/power       |  1782a3cc92f875fa3ac8a83395d204d2ca3d7f8c
   Dependencies:                     |     Stopgaps:
-------------------------------------+-------------------------------------

Comment (by vdelecroix):

 Replying to [comment:28 cheuberg]:
 > This is now refactored as a try/expect block; polynomial exponents are
 now disallowed.

 Thanks.

 > I am not completely comfortable with the long block wrapped within
 `try`/`expect` because I am not sure that we catch the correct
 `TypeError`. What do you think about that?

 Right. It is better to avoid long `try/except`. One possibility is
 {{{
 try:
     nn = pyobject_to_long(exp)
 except TypeError:
     # rational code
 else:
     # integer code
 }}}

--
Ticket URL: <http://trac.sagemath.org/ticket/20086#comment:29>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to