#18538: xsrange is not an iterator when called with Python ints or longs
------------------------+----------------------------
   Reporter:  tmonteil  |            Owner:
       Type:  defect    |           Status:  new
   Priority:  major     |        Milestone:  sage-6.8
  Component:  misc      |         Keywords:
  Merged in:            |          Authors:
  Reviewers:            |  Report Upstream:  N/A
Work issues:            |           Branch:
     Commit:            |     Dependencies:
   Stopgaps:            |
------------------------+----------------------------
 As reported in [http://ask.sagemath.org/question/26950/range-xrange-and-
 ellipsis-iteration/ this ask question]: `xsrange` claims to return an
 iterator while it does not provide a `.next()` method when called with
 Python ints or longs:


 {{{
 sage: xsrange(int(42)).next()
 AttributeError: 'xrange' object has no attribute 'next'
 }}}

 This is because in those cases, it returns an `xrange` object (which is
 only an iterable).

--
Ticket URL: <http://trac.sagemath.org/ticket/18538>
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