#9062: Add support for toric lattices
----------------------------------+-----------------------------------------
   Reporter:  novoselt            |       Owner:  mhampton  
       Type:  enhancement         |      Status:  needs_work
   Priority:  major               |   Milestone:  sage-4.5  
  Component:  geometry            |    Keywords:            
     Author:  Andrey Novoseltsev  |    Upstream:  N/A       
   Reviewer:  Volker Braun        |      Merged:            
Work_issues:                      |  
----------------------------------+-----------------------------------------
Changes (by davidloeffler):

  * status:  positive_review => needs_work


Comment:

 While testing I found a heisenbug caused by this patch. If you run "make
 ptestlong", there is a failure in toric_lattice_element.pyx; but it works
 fine if you doctest just that file.

 The problem is this comparison function:
 {{{
     def __cmp__(self, right):
         r"""
 [...]
             sage: cmp(n, 1)
             -1
         """
         c = cmp(type(self), type(right))
         if c:
             return c
 }}}

 The doctest is sensitively dependent on the exact memory locations of
 different classes, because {{{cmp(type(self), type(right))}}} compares on
 memory addresses. I suggest changing the doctest to
 {{{
 sage: n == 1
 False
 }}}
 which is much more robust.

 David

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