Hi!

If we say that Sage Integers and Rationals should comply with Python's
requirements, then for consistency, the same should hold for elements of
integral domains respectively of their fraction fields.

In particular, the required element methods of QuotientFields() should
be removed and instead one should require numerator and denominator
element proporties (if that's possible) for IntegralDomains().

Inside the Sage library, either solution is doable with a different
amount of effort. The questions are:
 - To what extent each solution breaks external code?
 - Are these backwards incompatibilities acceptable?

Currently a modification of Mark's suggestion 3. (perhaps including 2.)
makes most sense to me:
 - Change numerator and denominator of *all* integral domain elements
   (not just integers and rationals) into properties, also taking into
   account the stuff required by categories.
 - Make integers and rationals callable, returning themselves and
   raising a deprecation warning.
 - (Perhaps) add numer and denom methods.

Rationale: In external code, I guess the most common use case of
numerator and denominator methods is for rationals. Hence, the damage to
external code would be minimised by preserving backwards compatibility
for Rationals. And after some deprecation period we would achieve a
consistent behaviour for all kindes of fraction field elements compliant
with python numbers.

Best regards,
Simon

-- 
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 sage-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/qhmv26%247qm2%241%40blaine.gmane.org.

Reply via email to