#5967: [with patch, needs work] ElementWrapper: A class for wrapping Sage or
Python objects as Sage elements
-------------------------+--------------------------------------------------
 Reporter:  nthiery      |       Owner:  nthiery 
     Type:  enhancement  |      Status:  new     
 Priority:  major        |   Milestone:  sage-4.0
Component:  misc         |    Keywords:          
-------------------------+--------------------------------------------------

Comment(by nthiery):

 Replying to [comment:1 mabshoff]:
 > This is broken:
 > {{{
 >       129                 sage: cmp(l11, l12), cmp(l12, l11)   # values
 differ
 >       130                 (-1, 1)
 >       131                 sage: cmp(l11, l21), cmp(l21, l11)   # parents
 differ
 >       132                 (-1, 1)
 > }}}
 > '''Never''' check the return value of {{{cmp}}} to be -1 or 1, but
 always write
 > {{{
 > sage: cmp(l11, l21) in [-1,1]
 > True
 > }}}
 > since the value depends on memory location. I have had to fix this
 literally dozens of times in doctests.

 Ok, will do.

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