#16238: Correct call convention for isogenies
-------------------------------------+------------------------
Reporter: sbesnier | Owner:
Type: defect | Status: new
Priority: major | Milestone: sage-6.2
Component: elliptic curves | Resolution:
Keywords: call isogeny | Merged in:
Authors: Sébastien Besnier | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
Dependencies: #12880 | Stopgaps:
-------------------------------------+------------------------
Comment (by pbruin):
It is not uncommon for `__call__()` to take extra (positional or keyword)
arguments; this is used for example to implement `E(x,y)` as an
alternative notation for `E((x, y))` to construct a point on an elliptic
curve.
I think that you can rename `__call__()` to `_call_()` if you also
implement `_call_with_args()`, for example as follows (the non-standard
calling convention seems to be a consequence of Cython restrictions):
{{{
#!diff
diff --git a/src/sage/schemes/elliptic_curves/ell_curve_isogeny.py
b/src/sage/schemes/elliptic_curves/ell_curve_isogeny.py
index 8b18590..7aa1583 100644
--- a/src/sage/schemes/elliptic_curves/ell_curve_isogeny.py
+++ b/src/sage/schemes/elliptic_curves/ell_curve_isogeny.py
@@ -1029,6 +1029,8 @@ class EllipticCurveIsogeny(Morphism):
return outE2.point([R(outP[0]), R(outP[1]), R(1)], check=False)
+ def _call_with_args(self, x, args=(), kwds={}):
+ return self._call_(x, *args, **kwds)
def __getitem__(self, i):
self.__initialize_rational_maps()
}}}
However, I'm wondering if this `output_base_ring` argument is used for any
purpose at all. You could try simply removing it; then
`_call_with_args()` is not necessary either.
--
Ticket URL: <http://trac.sagemath.org/ticket/16238#comment:2>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.