Ticket #4383: trac_4383-order-trivial-permgp2.patch

File trac_4383-order-trivial-permgp2.patch, 954 bytes (added by wdj, 12 years ago)

based on 3.2.alpha1 - apply after the first patch

  • sage/groups/perm_gps/permgroup.py

    # HG changeset patch
    # User David Joyner <wdjoyner@gmail.com>
    # Date 1225395938 14400
    # Node ID 6c2e187f6c5ba5931c0542664b98443fcde44a18
    # Parent  4c14cc618882892b8957eca1c54e60a789d5c4d3
    added doctest - wdj
    
    diff -r 4c14cc618882 -r 6c2e187f6c5b sage/groups/perm_gps/permgroup.py
    a b  
    766766            sage: G = PermutationGroup([[(1,2,3),(4,5)], [(1,2)]])
    767767            sage: G.order()
    768768            12
     769            sage: G = PermutationGroup([()])
     770            sage: G.order()
     771            1
     772            sage: G = PermutationGroup([])
     773            sage: G.order()
     774            1
     775
    769776        """
    770777        G = self
    771778        if G.gens()==[] or G.gens()==[G(1)]:
    772             return Integer(0)
     779            return Integer(1)
    773780        return Integer(self._gap_().Size())
    774781
    775782    def random_element(self):