Author skrah
Recipients belopolsky, johnwalker, mark.dickinson, rhettinger, serhiy.storchaka, skrah, steven.daprano, terry.reedy
Date 2015-12-27.19:53:37
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1451246017.58.0.791389277378.issue25928@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2015-12-27 19:53:37skrahsetrecipients: + skrah, rhettinger, terry.reedy, mark.dickinson, belopolsky, steven.daprano, serhiy.storchaka, johnwalker
2015-12-27 19:53:37skrahsetmessageid: <1451246017.58.0.791389277378.issue25928@psf.upfronthosting.co.za>
2015-12-27 19:53:37skrahlinkissue25928 messages
2015-12-27 19:53:37skrahcreate