Ticket #8335: trac_8335-rebase_14958.patch

File trac_8335-rebase_14958.patch, 2.3 KB (added by jpflori, 8 years ago)

Name changes in #14958.

  • sage/rings/finite_rings/constructor.py

    # HG changeset patch
    # User Jean-Pierre Flori <jean-pierre.flori@ssi.gouv.fr>
    # Date 1375194667 -7200
    # Node ID e1cf7b4ae762499e477a65bb0142dabc3e169e04
    # Parent  02924a656902bd8ff927d05ae3942536404bc637
    Rebase on top of #14958
    
    diff --git a/sage/rings/finite_rings/constructor.py b/sage/rings/finite_rings/constructor.py
    a b  
    410410                    name = kwds['prefix'] + str(n)
    411411
    412412                if kwds.has_key('conway') and kwds['conway']:
    413                     from conway_polynomials import PseudoConwayPolyTree, find_pseudo_conway_polynomial_tree
    414                     pcpt = kwds['conway']
    415                     if (isinstance(pcpt, PseudoConwayPolyTree)
    416                         and pcpt.p == p and pcpt.n == n):
     413                    from conway_polynomials import PseudoConwayLattice, find_pseudo_conway_lattice
     414                    PCL = kwds['conway']
     415                    if (isinstance(PCL, PseudoConwayLattice)
     416                        and PCL.p == p and PCL.n == n):
    417417                        pass
    418                     elif pcpt is True:
    419                         pcpt = find_pseudo_conway_polynomial_tree(p, n)
     418                    elif PCL is True:
     419                        PCL = find_pseudo_conway_lattice(p, n)
    420420                    else:
    421421                        raise ValueError("invalid value for parameter 'conway'")
    422422                    if not kwds.has_key('prefix'):
    423423                        raise ValueError("a prefix must be specified for finite fields defined by Conway polynomials")
    424424                    if modulus is not None:
    425425                        raise ValueError("no modulus may be specified for finite fields defined by Conway polynomials")
    426                     # Always use the polynomial specified by pcpt.
    427                     modulus = pcpt.f
    428                     # We do not store `pcpt` in the finite field, so
     426                    # Always use the polynomial specified by PCL.
     427                    modulus = PCL.f
     428                    # We do not store `PCL` in the finite field, so
    429429                    # that we will not be forced in the future to
    430430                    # recognise it for unpickling.  The pseudo-Conway
    431431                    # polynomial tree is currently cached by the code