#16584: allow R(vector())
-------------------------------------+-------------------------------------
       Reporter:  malb               |        Owner:
           Type:  defect             |       Status:  needs_review
       Priority:  minor              |    Milestone:  sage-6.3
      Component:  basic arithmetic   |   Resolution:
       Keywords:  sd59               |    Merged in:
        Authors:  Martin Albrecht    |    Reviewers:
Report Upstream:  N/A                |  Work issues:
         Branch:                     |       Commit:
  u/malb/t16584_integer_poly_vector_call|  
ba11d0103a75c1a78f3301c31d6bf8fea82d5bb5
   Dependencies:                     |     Stopgaps:
-------------------------------------+-------------------------------------

Comment (by tscrim):

 I'm worried about this change:
 {{{#!diff
 @@ -239,8 +249,11 @@ cdef class
 Polynomial_integer_dense_flint(Polynomial):
                  sig_off()
                  return

 -        elif not isinstance(x, list):
 -            x = [x]   # constant polynomials
 +        else:
 +            try:
 +                x = list(x) # at this point anything that can be a list,
 is treated list
 +            except TypeError:
 +                x = [x]   # constant polynomials

          sig_on()
          fmpz_poly_realloc(self.__poly, len(x))
 }}}
 In particular, we might end up trying to make a list of an infinite set,
 which runs indefinitely. However this isn't the problem, the issue is that
 we won't be able to interrupt it because it's not in a
 `sig_on()/sig_off()` block. This would also be useful for other such long
 time iterators.

--
Ticket URL: <http://trac.sagemath.org/ticket/16584#comment:7>
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 http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to