[issue45155] Add default arguments for int.to_bytes()
Barry A. Warsaw
report at bugs.python.org
Fri Sep 10 12:31:22 EDT 2021
Barry A. Warsaw <barry at python.org> added the comment:
Just to point out, struct module also uses “native” (i.e. system) byte order by default. Any choice other than that for to_bytes() seems both arbitrary and inconsistent.
> On Sep 10, 2021, at 00:48, Petr Viktorin <report at bugs.python.org> wrote:
>
> Exactly, a platform-dependent default is a bad idea. A default allows using the function without the code author & reviewer even being *aware* that there is a choice, and that is dangerous.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45155>
_______________________________________
More information about the Python-bugs-list
mailing list