#16926: Merge the features of SymmetricGroupAlgebra and SymmetricGroup.algebra
-------------------------------------+-------------------------------------
       Reporter:  nthiery            |        Owner:
           Type:  enhancement        |       Status:  needs_review
       Priority:  major              |    Milestone:  sage-6.4
      Component:  combinatorics      |   Resolution:
       Keywords:                     |    Merged in:
        Authors:  Travis Scrimshaw   |    Reviewers:
Report Upstream:  N/A                |  Work issues:
         Branch:                     |       Commit:
  public/combinat/fix_sga-16926      |  18b3441e41e0f30b6bc02bd5a746096b17189e27
   Dependencies:                     |     Stopgaps:
-------------------------------------+-------------------------------------

Comment (by tscrim):

 Replying to [comment:23 darij]:
 > But meanwhile, I disagree about `__contains__`. This method tests
 containment in Permutations(n), not in whatever subclass we have inherit
 from `StandardPermutations_n_abstract`. If it stays in the ABC, then every
 subclass that does not override it will have a wrong `__contains__` test.
 If you just want to be able to use it out of subclasses, why not
 @classmethod or @staticmethod?

 It would potentially give false positives, but it's better than the
 generic one from `Parent` (which is part of the test):
 {{{
 sage: P = Permutations(5, avoiding=[1,4,2,3])
 sage: P([1,4,2,3,5]) in P
 True
 }}}
 The idea is to override it for extra information and to include a super
 call so as to avoid duplicating code (i.e., this is good OOP).

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