Ticket #12262: 12262-review.patch

File 12262-review.patch, 2.9 KB (added by davidloeffler, 7 years ago)

Reviewer patch; apply over the rebased v5.0.beta8 patch

  • sage/rings/finite_rings/element_base.pyx

    # HG changeset patch
    # User David Loeffler <d.loeffler.01@cantab.net>
    # Date 1332094871 0
    # Node ID b20cde88a7eb2300fc97c711a969be93dde3b455
    # Parent  043f1d83401880139532d635c3191b0ad4ada0f1
    #12262: reviewer changes
    
    diff --git a/sage/rings/finite_rings/element_base.pyx b/sage/rings/finite_rings/element_base.pyx
    a b  
    476476        return self.parent().prime_subfield()(self._pari_().trace().lift())
    477477
    478478    def multiplicative_order(self):
    479         """
     479        r"""
    480480        Return the multiplicative order of this field element.
    481481
     482        EXAMPLE::
     483
     484            sage: S.<a> = GF(5^3); S
     485            Finite Field in a of size 5^3
     486            sage: a.multiplicative_order()
     487            124
     488            sage: (a^8).multiplicative_order()
     489            31
     490            sage: S(0).multiplicative_order()
     491            Traceback (most recent call last):
     492            ...
     493            ArithmeticError: Multiplicative order of 0 not defined.
    482494        """
    483495        import sage.rings.arith
    484496       
    485497        if self.is_zero():
    486             raise ArithmeticError, "Multiplicative order of 0 not defined."
     498            raise ArithmeticError("Multiplicative order of 0 not defined.")
    487499        n = self._parent.order() - 1
    488500        F = self._parent.factored_unit_order()[0]
    489501        order = 1
  • sage/rings/finite_rings/homset.py

    diff --git a/sage/rings/finite_rings/homset.py b/sage/rings/finite_rings/homset.py
    a b  
    8383        """
    8484        EXAMPLES::
    8585
    86             sage: Hom(GF(4, 'a'), GF(16, 'b')) # indirect doctest
    87             Set of field embeddings from Finite Field in a of size 2^2 to Finite Field in b of size 2^4
    88             sage: Hom(GF(4, 'a'), GF(4, 'c'))
    89             Set of field embeddings from Finite Field in a of size 2^2 to Finite Field in c of size 2^2
    90             sage: Hom(GF(4, 'a'), GF(4, 'a'))
    91             Automorphism group of Finite Field in a of size 2^2
     86            sage: Hom(GF(4, 'a'), GF(16, 'b'))._repr_()
     87            'Set of field embeddings from Finite Field in a of size 2^2 to Finite Field in b of size 2^4'
     88            sage: Hom(GF(4, 'a'), GF(4, 'c'))._repr_()
     89            'Set of field embeddings from Finite Field in a of size 2^2 to Finite Field in c of size 2^2'
     90            sage: Hom(GF(4, 'a'), GF(4, 'a'))._repr_()
     91            'Automorphism group of Finite Field in a of size 2^2'
    9292        """
    9393        D = self.domain()
    9494        C = self.codomain()
  • sage/rings/finite_rings/integer_mod_ring.py

    diff --git a/sage/rings/finite_rings/integer_mod_ring.py b/sage/rings/finite_rings/integer_mod_ring.py
    a b  
    123123
    124124            sage: Zmod.create_key(7)
    125125            7
     126            sage: Zmod.create_key(7, Fields())
     127            (7, Category of fields)
    126128        """
    127129        if category is None:
    128130            return order