#4190: [with patch, with positive review and a question] division of number
field
order elements doesn't check for membership
---------------------------+------------------------------------------------
Reporter: davidloeffler | Owner: davidloeffler
Type: defect | Status: assigned
Priority: major | Milestone: sage-3.2.1
Component: number theory | Resolution:
Keywords: |
---------------------------+------------------------------------------------
Comment (by davidloeffler):
As for the inheritance thing: unfortunately, OrderElement_relative,
OrderElement_absolute and OrderElement_quadratic all inherit from the
corresponding number field classes, which all have different _ div _
implementations, and multiple inheritance is banned. So there is no one
place we can put the method where it will be inherited by everything.
Personally I'm not sure I agree on that design decision, but I don't have
the skills or the time to reimplement it otherwise.
As far as I can tell, the "a in OK" is calling some very generic code
(probably in sage.structure.Parent at a guess) which checks whether or not
a.parent() is OK, and if it isn't, attempts to coerce a into OK via OK's
__ call __ method, returning False if this fails.
I am in India at the moment and it is late evening local time; I will get
to work on improving the doctests tomorrow.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/4190#comment:10>
Sage <http://sagemath.org/>
Sage - Open Source Mathematical Software: Building the Car Instead of
Reinventing the Wheel
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en
-~----------~----~----~----~------~----~------~--~---