#6732: [with patch, needs review] spell-check all modules under sage/server
---------------------------+------------------------------------------------
 Reporter:  mvngu          |       Owner:  tba            
     Type:  defect         |      Status:  new            
 Priority:  major          |   Milestone:  sage-4.1.1     
Component:  documentation  |    Keywords:                 
 Reviewer:                 |      Author:  Minh Van Nguyen
   Merged:                 |  
---------------------------+------------------------------------------------

Comment(by mvngu):

 Replying to [comment:2 mpatel]:
 > {{{
 > $ cd $SAGE_ROOT/devel/sage/sage/server/notebook; grep rrr *.py
 > ./notebook.py:        except AttributeErrro:
 > }}}
 > Separate ticket?
 Nice catch. Can you please open a ticket for that? Here's a relevant
 snippet from the file `sage/server/notebook/notebook.py`:
 {{{
 try:
     dir = self.__absdir
 except AttributeErrro:
     dir = self.__dir
 import shutil
 # We ignore_errors because in rare parallel doctesting
 # situations sometimes the directory gets cleaned up too
 # quickly, etc.
 shutil.rmtree(dir, ignore_errors=True)
 }}}
 As I see it, this is a case where only some of the execution paths of the
 above code have been doctested. One should endeavour to test all the
 execution paths of a function. In particular, doctest the case where the
 try block is successfully executed. And also the case where the try block
 fails so that the flow of control then jumps to the except block, in which
 case the Python interpreter would complain about syntax errors. It would
 be nice to have some sort of static code analysis tool for Sage, something
 that would catch errors that would be reported by a compiler of a
 statically typed language such as C/C++, Java. See Dough Hellmann's
 
[http://www.doughellmann.com/articles/CompletelyDifferent-2008-03-linters/index.html
 article] for some inspiration on this issue.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/6732#comment:3>
Sage <http://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 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