#19659: Poset: inverse function of ordinal_sum()
-------------------------------------+-------------------------------------
       Reporter:  jmantysalo         |        Owner:
           Type:  enhancement        |       Status:  needs_review
       Priority:  major              |    Milestone:  sage-7.0
      Component:  combinatorics      |   Resolution:
       Keywords:  poset              |    Merged in:
        Authors:  Jori Mäntysalo     |    Reviewers:
Report Upstream:  N/A                |  Work issues:
         Branch:                     |       Commit:
  u/jmantysalo/develop               |  01f9e1c6bb502e6044181c856bcb8984718fd237
   Dependencies:                     |     Stopgaps:
-------------------------------------+-------------------------------------

Comment (by ncohen):

 > Is this any more clear?

 To me it is, but I won't be surprised if it is a matter of taste. It also
 avoids the 'for/else' trick that I never met anywhere except in Python.

 > If I do
 >
 > {{{
 > all(self.degree_out(l) == len(upper) for l in lower)
 > }}}
 >
 > then `len(upper)` will be called many times.

 I see that you cached it in your code, and there is of course nothing
 wrong with that.

 Nathann

--
Ticket URL: <http://trac.sagemath.org/ticket/19659#comment:22>
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 https://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to