Message375940
> Personally, I think I'd rather have easier ways to create Decimal objects
Wouldn't everybody? :-P But that's been proposed at least 4 times already and never got anywhere. My proposal is at least original, has a precedent at the above link (strings as surogate literals, preserving value across semantic boundaries), _and_ comes with a natural scope limitation guarantee: noone can argue for '2.1' + '3.5' to be '5.6' (because it is already '2.13.5';), it works only in the first argument of round.
Also, the string at that time is not so pointless: many people use round for printing, at that point you are going to convert to str anyway. And round(str(result), digits) gives a nice way to use python's builtin repr capability of "picking the shortest representation" for DWIMming: it's the best of both worlds, your implementation DWIMs, but you're not responsible for corner cases. ;-=
But no, I'm not going to Python-ideas, for the same reason I'm not going back to high school: too many bullies, too hard to get your voice heard, mostly because everyone assumes you wouldn't be there if you had anything smart to say. :-/ |
|
Date |
User |
Action |
Args |
2020-08-26 17:06:36 | veky | set | recipients:
+ veky, tim.peters, rhettinger, ronaldoussoren, mark.dickinson, eric.smith, stutzbach, steven.daprano, marco_ocram |
2020-08-26 17:06:36 | veky | set | messageid: <1598461596.85.0.100962796772.issue41598@roundup.psfhosted.org> |
2020-08-26 17:06:36 | veky | link | issue41598 messages |
2020-08-26 17:06:36 | veky | create | |
|