Ticket #4262: sage-4262.patch

File sage-4262.patch, 1.2 KB (added by was, 13 years ago)
  • sage/schemes/elliptic_curves/ell_generic.py

    # HG changeset patch
    # User William Stein <wstein@gmail.com>
    # Date 1223713645 25200
    # Node ID cc8a84ea857a6f33c1febf37874a6cb5ce5c60c1
    # Parent  9e2a6c94e810c244d757b2b981051dc29766c466
    trac #4262 - Elliptic curve a_invariants command returns a list reference (BAD!!)
    
    diff -r 9e2a6c94e810 -r cc8a84ea857a sage/schemes/elliptic_curves/ell_generic.py
    a b  
    741741        """
    742742        The a-invariants of this elliptic curve.
    743743
     744        OUTPUT:
     745            list -- a new list
     746
    744747        EXAMPLES:
    745748            sage: E = EllipticCurve([1,2,3,4,5])
    746749            sage: E.a_invariants()
     
    753756            sage: E = EllipticCurve([GF(7)(3),5])
    754757            sage: E.a_invariants()
    755758            [0, 0, 0, 3, 5]
     759
     760        We check that a new list is returned:
     761            sage: E = EllipticCurve([1,0,0,0,1])
     762            sage: E.a_invariants()[0] = 100000000
     763            sage: E
     764            Elliptic Curve defined by y^2 + x*y  = x^3 +1 over Rational Field
    756765        """
    757         return self.__ainvs
     766        return list(self.__ainvs)
    758767
    759768    ainvs = a_invariants
    760769