#13589: Controlling C3 to solve once for all the Method Resolution Order issues 
for
category classes
-------------------------------------+-------------------------------------
       Reporter:  nthiery            |        Owner:  nthiery
           Type:  defect             |       Status:  closed
       Priority:  major              |    Milestone:  sage-5.12
      Component:  categories         |   Resolution:  fixed
       Keywords:  method resolution  |    Merged in:  sage-5.12.beta0
  order, C3                          |    Reviewers:  Simon King, Florent
        Authors:  Nicolas M.         |  Hivert
  ThiƩry, Simon King                 |  Work issues:
Report Upstream:  N/A                |       Commit:
         Branch:                     |     Stopgaps:
   Dependencies:  #12894, #12876,    |
  #11935, #12895, #10193             |
-------------------------------------+-------------------------------------

Comment (by jdemeyer):

 While looking through the Sage sources, I noticed the following doctest,
 coming from this ticket:
 {{{
     sage: for l in L:
     ....:     x = HierarchyElement(10, l.to_poset())
     ....:     try:
     ....:         x.mro_standard
     ....:         assert False
     ....:     except:
     ....:         pass
     ....:     assert x.mro            == list(P)
     ....:     assert x.mro_controlled == list(P)
     ....:     assert x.all_bases_len() == 15
     ....:     stats.append(x.all_bases_controlled_len()-x.all_bases_len())
 }}}

 What is the purpose of the `assert False` here? I am asking because
 {{{
 try:
     foo()
     assert False
 except:
     pass
 }}}
 is entirely equivalent to
 {{{
 try:
     foo()
 except:
     pass
 }}}

--
Ticket URL: <http://trac.sagemath.org/ticket/13589#comment:85>
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/d/optout.

Reply via email to