Ticket #8548: trac_8548_error_msg_permutation-sg.patch

File trac_8548_error_msg_permutation-sg.patch, 880 bytes (added by giraudo, 12 years ago)
  • sage/combinat/permutation.py

    # HG changeset patch
    # User Samuele Giraudo <samuele.giraudo@univ-mlv.fr>
    # Date 1268757189 -3600
    # Node ID 28e28a60bb6b725f69a133ddee455000b5d0a9d9
    # Parent  5245a2cd5caf66271bc4896e030927a2a7a88578
    [mq]: trac_8548_error_msg_permutation-sg.patch
    
    diff --git a/sage/combinat/permutation.py b/sage/combinat/permutation.py
    a b class Permutation_class(CombinatorialObj 
    26202620        from sage.combinat.perfect_matching import PerfectMatchings
    26212621        n = len(self)
    26222622        if n%2==1:
    2623             raise ValueError, "%s is a permutation of odd size and has no coset-type"%p
     2623            raise ValueError, "%s is a permutation of odd size and has no coset-type"%self
    26242624        S=PerfectMatchings(n)([(2*i+1,2*i+2) for i in range(n//2)])
    26252625        return S.loop_type(S.conjugate_by_permutation(self))
    26262626