Perhaps I do not understand sxrange / xsrange correctly. The reference manual entries for them seem to be similar. Is there a difference? (If one is just an alias for the other, it would be best to say so. If they are different, the reference manual needs to emphasize the difference.)
Also the reference manual entry for sage.misc.misc.sxrange has the note : This function is called xsrange to distinguish it from the builtin Python xrange command. Should it say "sxrange" rather than "xsrange"? Finally here is my attempt to use sxrange (xsrange gives similar output): e = 1 while true: print Integer(10^e) for i in sxrange(Integer(2),Integer(10^e)): if i == 3: break e += 1 gives 10 100 1000 10000 100000 1000000 10000000 100000000 1000000000 10000000000 100000000000 1000000000000 10000000000000 100000000000000 1000000000000000 10000000000000000 100000000000000000 1000000000000000000 10000000000000000000 Traceback (most recent call last): File "zzzbug.py", line 7, in <module> for i in sxrange(Integer(_sage_const_2 ),Integer(_sage_const_10 **e)): File "/home/mariah/sage/sage-4.1.1-x86_64-Linux-core2-fc/local/lib/python2.6/site-packages/sage/misc/misc.py", line 1059, in generic_xsrange for k in xrange(icount): OverflowError: long int too large to convert to int I really want an iterator for the "for i in ..." loop. Is this a bug? Is there a better way to do what I want? -- Mariah --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---