#20740: Drop return type from single-underscore arithmetic methods
----------------------------------+------------------------
Reporter: jdemeyer | Owner:
Type: defect | Status: new
Priority: major | Milestone: sage-7.3
Component: coercion | Resolution:
Keywords: | Merged in:
Authors: Jeroen Demeyer | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
Dependencies: | Stopgaps:
----------------------------------+------------------------
Description changed by jdemeyer:
Old description:
> Replace
> {{{
> cpdef ModuleElement _add_(left, ModuleElement right)
> }}}
> by
> {{{
> cpdef _add_(left, ModuleElement right)
> }}}
> and similar. The return type serves absolutely no purpose.
>
> Also remove the superfluous declarations of these methods in other `.pxd`
> files.
New description:
Replace
{{{
cpdef ModuleElement _add_(left, ModuleElement right)
}}}
by
{{{
cpdef _add_(left, ModuleElement right)
}}}
and similar. The return type serves no purpose:
1. if you really do need any information of the return type, then
something like `ModuleElement` is too generic anyway.
2. it forces Cython to add some checks that the returned value is of the
correct type, so it might actually slow down things.
Also remove the superfluous declarations of these methods in other `.pxd`
files.
--
--
Ticket URL: <http://trac.sagemath.org/ticket/20740#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 https://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.