Ticket #8500: trac_8500_number_transitive_group-review-nb.patch

File trac_8500_number_transitive_group-review-nb.patch, 1.4 KB (added by nborie, 12 years ago)
  • sage/groups/perm_gps/permgroup_named.py

    # HG changeset patch
    # User Nicolas Borie <nicolas.borie at math.u-psud.fr>
    # Date 1271664282 -7200
    # Node ID 3086c5a74b683730e92330aa5bf1d5d8573c7c09
    # Parent  8e9e6b0d869e12391482391b94877307fcb73f22
    #8500: Add the set of TransitiveGroups; final patch
    
    diff -r 8e9e6b0d869e -r 3086c5a74b68 sage/groups/perm_gps/permgroup_named.py
    a b  
    908908        d = ZZ(d)
    909909        n = ZZ(n)
    910910        assert d >= 0
    911         assert n > 0
    912911        max_n = TransitiveGroups(d).cardinality()
    913912        assert n <= max_n, "n should be in {1,..,%s}"%max_n
     913        assert n > 0, "n should be in {1,..,%s}"%max_n
    914914        gap_group = 'Group([()])' if d in [0,1] else 'TransitiveGroup(%s,%s)'%(d,n)
    915915        try:
    916916            PermutationGroup_generic.__init__(self, gap_group=gap_group)
     
    972972
    973973class TransitiveGroupsAll(DisjointUnionEnumeratedSets):
    974974    """
    975     The finite set of all transitive groups.
     975    The infinite set of all transitive groups.
    976976
    977977    EXAMPLES::
    978978
     
    11191119            sage: TransitiveGroups(5)[0]
    11201120            Traceback (most recent call last):
    11211121            ...
    1122                 assert n > 0
    1123             AssertionError
     1122            AssertionError: n should be in {1,..,5}
    11241123        """
    11251124        return TransitiveGroup(self._degree, n)
    11261125