[issue41598] Adding support for rounding modes to builtin round
Vedran Čačić
report at bugs.python.org
Tue Aug 25 07:28:33 EDT 2020
Vedran Čačić <vedgar at gmail.com> added the comment:
> I'd rather add whatever bells and whistles we need (if any) to make it easier for users who care about this to use Decimal.
This made me think. (I have tons of these ideas, but usually am afraid of voicing them unless encouraged by comments such as this one.;) How about this whistle: we allow round to accept str as the first argument?
In a very unrelated context (https://www.python.org/dev/peps/pep-0484/#forward-references) Guido has said something like "when literals aren't what they seem, strings are a good enough substitute". Maybe here too?
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41598>
_______________________________________
More information about the Python-bugs-list
mailing list