#11490: Add a thematic tutorial on coercion and categories
---------------------------------------------------------+------------------
       Reporter:  SimonKing                              |         Owner:  
mvngu       
           Type:  enhancement                            |        Status:  
needs_review
       Priority:  major                                  |     Milestone:  
sage-5.7    
      Component:  documentation                          |    Resolution:       
       
       Keywords:  categories coercion thematic tutorial  |   Work issues:       
       
Report Upstream:  N/A                                    |     Reviewers:       
       
        Authors:  Simon King                             |     Merged in:       
       
   Dependencies:  #14084                                 |      Stopgaps:       
       
---------------------------------------------------------+------------------

Comment (by SimonKing):

 Replying to [comment:11 tscrim]:
 > - In the `__cmp__` block, it might be worth noting that if `__cmp__` is
 not implemented, bad things can happen when calling `cmp` (ex. #14065)

 You don't give negative examples in #14065. Do you mean things like the
 following?
 {{{
 sage: class Foo(Element):
 ....:     def __init__(self, x, parent=None):
 ....:         self.x = x
 ....:     def _repr_(self):
 ....:         return "<%s>"%self.x
 ....:
 sage: a = Foo(1,parent=ZZ)
 sage: b = Foo(2,parent=ZZ)
 sage: cmp(a,b)
 Traceback (most recent call last):
 ...
 NotImplementedError: BUG: sort algorithm for elements of 'None' not
 implemented
 }}}

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11490#comment:16>
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to