Message305843
> There is one slight additional tweak in the patch: in the case of ndigits < 0, it returns an int, not a Fraction (see test_fractions modification to make it pass).
This would be a backwards incompatible change, potentially breaking existing code, so we'd need to think carefully before making it. It's definitely not a "slight tweak" :-).
I'd prefer that this change is not made at all: in general, it's not a great idea to have a return _type_ that changes depending on the _values_ of an argument (though as always, there are exceptions). The general rule is that two-argument `round` returns something of the same type as its first argument: I don't think there's a really compelling reason to change this for the Fraction type. So -1 on this change from me. |
|
Date |
User |
Action |
Args |
2017-11-08 13:56:47 | mark.dickinson | set | recipients:
+ mark.dickinson, rhettinger, facundobatista, belopolsky, stutzbach, skrah, serhiy.storchaka, wolma |
2017-11-08 13:56:47 | mark.dickinson | set | messageid: <1510149407.79.0.213398074469.issue31978@psf.upfronthosting.co.za> |
2017-11-08 13:56:47 | mark.dickinson | link | issue31978 messages |
2017-11-08 13:56:47 | mark.dickinson | create | |
|