Stefan Krah added the comment:

Keeping the API small is a good reason against it.

There aren't many ways to destructure a Decimal though:  As far
as I know, the return value of as_tuple() dates back from the time
when the coefficient was actually a tuple.  The function is slow
and not really nice to use.

Probably many people would be happy if we added as_integer_ratio()
and an as_triple() function that represents the coefficient as
an integer.


> Off-topic: I wonder whether `int.as_integer_ratio` should be implemented (for 
> the same reasons that `int.numerator`, `int.real` and so on are).

If users want to duck-type, I think yes.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue25928>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to