# HG changeset patch
# User William Stein <wstein@gmail.com>
# Date 1311120020 25200
# Node ID 5485765a0afc8cb913799584904ff800a22e3c5f
# Parent 251d8749f5bfd053fdb8bfe0e2d6b4f48ed6d8ee
trac 11533: allow unicode strings for specifying elliptic curve cremona labels
diff --git a/sage/schemes/elliptic_curves/constructor.py b/sage/schemes/elliptic_curves/constructor.py
|
a
|
b
|
|
| 78 | 78 | Elliptic Curve defined by y^2 + y = x^3 - 7*x + 6 over Rational Field |
| 79 | 79 | sage: EllipticCurve('389a') |
| 80 | 80 | Elliptic Curve defined by y^2 + y = x^3 + x^2 - 2*x over Rational Field |
| | 81 | |
| | 82 | Unicode labels are allowed:: |
| | 83 | |
| | 84 | sage: EllipticCurve(u'389a') |
| | 85 | Elliptic Curve defined by y^2 + y = x^3 + x^2 - 2*x over Rational Field |
| 81 | 86 | |
| 82 | 87 | We create curves over a finite field as follows:: |
| 83 | 88 | |
| … |
… |
|
| 282 | 287 | elif rings.is_Field(x): |
| 283 | 288 | return ell_field.EllipticCurve_field(x, y) |
| 284 | 289 | return ell_generic.EllipticCurve_generic(x, y) |
| | 290 | |
| | 291 | if isinstance(x, unicode): |
| | 292 | x = str(x) |
| 285 | 293 | |
| 286 | 294 | if isinstance(x, str): |
| 287 | 295 | return ell_rational_field.EllipticCurve_rational_field(x) |