# HG changeset patch
# User William Stein <wstein@gmail.com>
# Date 1329335218 28800
# Node ID 5f62ab8b935963f447f8691d5cf3e7a929c045b1
# Parent cd3cbae8103daad8643a9d8182dd91ebaa57f5eb
Trac #12715: EllipticCurve(E.a_invariants()) doesn't work
diff git a/sage/schemes/elliptic_curves/constructor.py b/sage/schemes/elliptic_curves/constructor.py
a

b


62  62  `j`. Warning: this is deprecated. Use ``EllipticCurve_from_j(j)`` 
63  63  or ``EllipticCurve(j=j)`` instead. 
64  64  
 65  In each case above where the input is a list of length 2 or 5, one 
 66  can instead give a 2 or 5tuple instead. 
65  67  
66  68  EXAMPLES: We illustrate creating elliptic curves. 
67  69  
… 
… 

212  214  sage: type(E) 
213  215  <class 'sage.schemes.elliptic_curves.ell_field.EllipticCurve_field'> 
214  216  
 217  See trac #12517:: 
215  218  
 219  sage: E = EllipticCurve([1..5]) 
 220  sage: EllipticCurve(E.a_invariants()) 
 221  Elliptic Curve defined by y^2 + x*y + 3*y = x^3 + 2*x^2 + 4*x + 5 over Rational Field 
216  222  """ 
217  223  import ell_generic, ell_field, ell_finite_field, ell_number_field, ell_rational_field, ell_padic_field # here to avoid circular includes 
218  224  
… 
… 

318  324  k=j1728 
319  325  return EllipticCurve(F, [0,0,0,3*j*k, 2*j*k**2]) 
320  326  
321   if not isinstance(x,list): 
 327  if not isinstance(x, (list, tuple)): 
322  328  raise TypeError, "invalid input to EllipticCurve constructor" 
323  329  
324  330  x = Sequence(x) 