# 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


476  476  return self.parent().prime_subfield()(self._pari_().trace().lift()) 
477  477  
478  478  def multiplicative_order(self): 
479   """ 
 479  r""" 
480  480  Return the multiplicative order of this field element. 
481  481  
 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. 
482  494  """ 
483  495  import sage.rings.arith 
484  496  
485  497  if self.is_zero(): 
486   raise ArithmeticError, "Multiplicative order of 0 not defined." 
 498  raise ArithmeticError("Multiplicative order of 0 not defined.") 
487  499  n = self._parent.order()  1 
488  500  F = self._parent.factored_unit_order()[0] 
489  501  order = 1 
diff git a/sage/rings/finite_rings/homset.py b/sage/rings/finite_rings/homset.py
a

b


83  83  """ 
84  84  EXAMPLES:: 
85  85  
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' 
92  92  """ 
93  93  D = self.domain() 
94  94  C = self.codomain() 
diff git a/sage/rings/finite_rings/integer_mod_ring.py b/sage/rings/finite_rings/integer_mod_ring.py
a

b


123  123  
124  124  sage: Zmod.create_key(7) 
125  125  7 
 126  sage: Zmod.create_key(7, Fields()) 
 127  (7, Category of fields) 
126  128  """ 
127  129  if category is None: 
128  130  return order 