#15731: Too early coercion causes weird behavior of comparison
----------------------------+------------------------
       Reporter:  strenner  |        Owner:
           Type:  defect    |       Status:  new
       Priority:  major     |    Milestone:  sage-6.1
      Component:  coercion  |   Resolution:
       Keywords:            |    Merged in:
        Authors:            |    Reviewers:
Report Upstream:  N/A       |  Work issues:
         Branch:            |       Commit:
   Dependencies:            |     Stopgaps:
----------------------------+------------------------

Comment (by strenner):

 Well, I am not sure how it works either, but I did experiments in a python
 interpreter (with the `SpecialNumber` being defined as the original
 description), and I got this:

 {{{#!python:
 >>> a = SpecialNumber(3)
 >>> 4 < a
 False
 >>> 2 < a
 True
 }}}

 The only way I can explain this behavior is the `SpecialNumber.__gt__` is
 called at some point.

--
Ticket URL: <http://trac.sagemath.org/ticket/15731#comment:5>
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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to