I don't think there is any deep reason. Sage started much before the existence of the numbers Python module.
Note that the concept of "Number" is not clearly stated in the library. Does it include finite fields? padics? polynomials (these can be seen as infinitesimal deformation of scalars)? Vincent Le 15/07/2021 à 12:38, '[email protected]' via sage-devel a écrit :
Hi, I was looking into typing a bit and realized that our number field elements are not registered as numbers. So the following will not evaluate to true: sage: import numbers sage: K.<a> = QuadraticField(2) sage: isinstance(a, numbers.Number) Is there a reason, we do not register number fields in `rings/numbers_abc.py`? Can I just change this? E.g. I want to specify an iterable over numbers via `Iterable[numbers.Number]`, which would not include our number field elements currently. Jonathan
-- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/99f6876e-1346-5f03-7a1a-1b11ad37a853%40gmail.com.
