Re: [sage-devel] Re: Registering NumberField as numbers.Number

2021-07-16 Thread 'jonatha...@googlemail.com' via sage-devel
Thanks for the answers. I didn't realize this whole issue was this involved. It's certainly interesting. For now I think there is nothing wrong with registering `NumberFieldElement` as `numbers.Numbers`, see https://trac.sagemath.org/ticket/32206. Jonathan mathzeta2 schrieb am Donnerstag, 1

Re: [sage-devel] Re: Registering NumberField as numbers.Number

2021-07-15 Thread TB
On 15/07/2021 22:11, William Stein wrote: On Thu, Jul 15, 2021 at 11:05 AM William Stein wrote: On Thu, Jul 15, 2021 at 9:13 AM Nils Bruin wrote: Following up: while sage's "RationalNumber" is indeed a numbers.Rational according to "isinstance", it does not actually adhere to the stated AP

Re: [sage-devel] Re: Registering NumberField as numbers.Number

2021-07-15 Thread William Stein
On Thu, Jul 15, 2021 at 11:05 AM William Stein wrote: > > On Thu, Jul 15, 2021 at 9:13 AM Nils Bruin wrote: > > > > Following up: while sage's "RationalNumber" is indeed a numbers.Rational > > according to "isinstance", it does not actually adhere to the stated API: > > "numerator" and "denomin

Re: [sage-devel] Re: Registering NumberField as numbers.Number

2021-07-15 Thread Vincent Delecroix
See https://trac.sagemath.org/ticket/28234 Le 15/07/2021 à 18:13, Nils Bruin a écrit : Following up: while sage's "RationalNumber" is indeed a numbers.Rational according to "isinstance", it does not actually adhere to the stated API: "numerator" and "denominator" are supposed to be properties, b

Re: [sage-devel] Re: Registering NumberField as numbers.Number

2021-07-15 Thread William Stein
On Thu, Jul 15, 2021 at 9:13 AM Nils Bruin wrote: > > Following up: while sage's "RationalNumber" is indeed a numbers.Rational > according to "isinstance", it does not actually adhere to the stated API: > "numerator" and "denominator" are supposed to be properties, but in sage they > are method

[sage-devel] Re: Registering NumberField as numbers.Number

2021-07-15 Thread Nils Bruin
Following up: while sage's "RationalNumber" is indeed a numbers.Rational according to "isinstance", it does not actually adhere to the stated API: "numerator" and "denominator" are supposed to be properties, but in sage they are methods. So even in places where we are trying to fit into "Number

[sage-devel] Re: Registering NumberField as numbers.Number

2021-07-15 Thread Nils Bruin
Taking a quick look at the relevant PEP https://www.python.org/dev/peps/pep-3141/ or the documentation https://docs.python.org/3/library/numbers.html#module-numbers (the PEP has considerably more detail), I get the impression that our Integer and Rational type could be incorporated in the hiera