#4232: #249 causes bug in importing large lists
------------------------------+---------------------------------------------
 Reporter:  jason             |       Owner:  somebody  
     Type:  defect            |      Status:  new       
 Priority:  blocker           |   Milestone:  sage-3.1.3
Component:  basic arithmetic  |    Keywords:            
------------------------------+---------------------------------------------
 Try the following in a sage that contains the patch at #249

 {{{
 a=[(i,randint(0,100)) for i in range(3000)]
 f=open("mytest.sage",'w')
 f.write("a=[\n")
 f.writelines(["%s,\n"%str(i) for i in a])
 f.write("(0,0)]")
 f.close()
 load mytest.sage
 }}}

 Without the patch at #249, the load completes in about a second.  With the
 patch, I get recursion errors, ending in:

 {{{
 /home/jason/download/sage-3.1.3.alpha1/local/lib/python2.5/site-
 packages/sage/misc/preparser.py in preparse(line, reset, do_time,
 ignore_prompts)
     811
     812
 --> 813
     814
     815

 /home/jason/download/sage-3.1.3.alpha1/local/lib/python2.5/site-
 packages/sage/misc/preparser.py in preparse(line, reset, do_time,
 ignore_prompts)
     811
     812
 --> 813
     814
     815

 /home/jason/download/sage-3.1.3.alpha1/local/lib/python2.5/site-
 packages/sage/misc/preparser.py in preparse(line, reset, do_time,
 ignore_prompts)
     811
     812
 --> 813
     814
     815

 /home/jason/download/sage-3.1.3.alpha1/local/lib/python2.5/site-
 packages/sage/misc/preparser.py in preparse(line, reset, do_time,
 ignore_prompts)
     678
     679
 --> 680
     681
     682

 /home/jason/download/sage-3.1.3.alpha1/local/lib/python2.5/site-
 packages/sage/misc/preparser.py in strip_string_literals(code)
     267
     268
 --> 269
     270
     271

 RuntimeError: maximum recursion depth exceeded in cmp
 }}}

 One solution is to revert the patch at #249.  Of course, the better is to
 find the bug and fix it :).

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/4232>
Sage <http://sagemath.org/>
Sage - Open Source Mathematical Software: Building the Car Instead of 
Reinventing the Wheel
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to