#14772: Remove CombinatorialClass from Permutations
------------------------------------+------------------------------------
       Reporter:  tscrim            |         Owner:  sage-combinat
           Type:  enhancement       |        Status:  needs_review
       Priority:  major             |     Milestone:  sage-5.11
      Component:  combinatorics     |    Resolution:
       Keywords:  days49            |     Merged in:
        Authors:  Travis Scrimshaw  |     Reviewers:
Report Upstream:  N/A               |   Work issues:
         Branch:                    |  Dependencies:  #8386 #14519 #14808
       Stopgaps:                    |
------------------------------------+------------------------------------

Old description:

> Part of #12913.

New description:

 Part of #12913.

 ----

 Apply: [attachment:trac_14772-remove_cc_permutations-ts.patch]

--

Comment (by tscrim):

 I hacked around it:
 {{{
 if n > 0:
     return iter(PatternAvoider(self, self._p))
 return iter([self.element_class(self, [])])
 }}}
 it's a python issue that putting a yield in the function makes it into a
 generator, which can't return anything at all, including iterators. This
 makes sense because python a priori doesn't know that it will be an
 iterator; plus the can of worms whether it should continue the iteration
 from that point with that iterator.

 All combined and back to you Darij.

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