-
-
Notifications
You must be signed in to change notification settings - Fork 491
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clean up some _element_constructor_() methods #29375
Comments
Commit: |
comment:2
would you please fix the pyflakes warning from patchbot report ? |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:4
Replying to @fchapoton:
Done, thanks. |
comment:5
looks good to me, and the bot is fully green. Maybe Travis, who knows better the coercion framework, could give his word ? |
comment:6
Replying to @fchapoton:
Yes, what is in the ticket description is correct (it is faster to do it there because it is Cython too). So +1 for doing this. |
comment:7
ok, then let it be. |
Reviewer: Frédéric Chapoton, Travis Scrimshaw |
Changed branch from u/pbruin/29375-clean_up_element_constructor to |
The coercion framework never calls
_element_constructor_()
methods without optional or keyword arguments on an input that is already in the correct parent. This ticket removes some unnecessary checks for this case.I checked that (the branches of) the
if
statements removed by this ticket are never called by temporarily insertingassert
statements. In some other cases, I added doctests showing that the respectiveif
statements cannot be removed (because the_element_constructor_()
method has a optional or keyword arguments).The deleted code in
multi_polynomial_libsingular
is no longer needed because these cases are handled by coercion maps from/via the base ring since #29247.CC: @tscrim
Component: coercion
Author: Peter Bruin
Branch/Commit:
b526945
Reviewer: Frédéric Chapoton, Travis Scrimshaw
Issue created by migration from https://trac.sagemath.org/ticket/29375
The text was updated successfully, but these errors were encountered: