-
-
Notifications
You must be signed in to change notification settings - Fork 517
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
Call __init__
of base classes
#12071
Comments
comment:2
I guess the priority "major" is enough. After all, we are not talking about errors. |
comment:3
It was my understanding that this is done intentionally since these parents don't use the new coercion framework, so you get less errors if you circumvent some of the constructors. So really, you are saying rewrite everything for the newer framework :-) |
comment:4
Shouldn't that be done anyway? |
comment:5
Replying to @vbraun:
I don't think so. It rather seems to me that these are very old bits of code that predate the new coercion framework. Moreover, in the few cases that I fixed at #11900, it was really just "replace |
Base classes are useful, and they are used. They would be even more useful if one would call their
__init__
- but that's often not done in Sage.For example, even though the class of continued fraction field inherits from the base class
sage.rings.ring.Field
, it used to only callParentWithGens.__init__
. That is very annoying, since by #9138Field.__init__
would automatically initialise the correct category.I fixed a couple of cases at #11900, so, I make this a dependency. Hoewever, according to search_src, there are still many cases left that needs to be looked at:
Depends on #11900
CC: @kini
Component: performance
Keywords: base class init
Issue created by migration from https://trac.sagemath.org/ticket/12071
The text was updated successfully, but these errors were encountered: