Message401693
> I’m not convinced. I’m more concerned with the obscurity of the API. If I saw its use in some code I was reviewing, I’d look it up, and then I’d know exactly what it was doing.
I know you would. But there are many others who just try things until they work.
Also, if this does become *the* way to create bytes, it won't be obscure any more -- but you'd still need to remember to always specify byteorder for length > 1. That is, unless you *want* platform-specific behavior, which I don't think is all that often. Even in this case, you want to think about the issue, and omitting the argument is a bad way to encode that you thought about it.
---
Hm, what happened to the idea of only requiring byteorder for `length > 1`? I recall it being discussed |
|
Date |
User |
Action |
Args |
2021-09-13 09:14:41 | petr.viktorin | set | recipients:
+ petr.viktorin, barry, rhettinger, mark.dickinson, ncoghlan, vstinner, ethan.furman, serhiy.storchaka, veky, brandtbucher |
2021-09-13 09:14:41 | petr.viktorin | set | messageid: <1631524481.47.0.117656770815.issue45155@roundup.psfhosted.org> |
2021-09-13 09:14:41 | petr.viktorin | link | issue45155 messages |
2021-09-13 09:14:41 | petr.viktorin | create | |
|