Message395686
To explain my thought,
> Not every one line expression needs to be a function in a library. `bool(getrandbits(1))` is self-explanatory enough,
Yeah, I agree with the point of view, it might be enough.
But considering the popularity of the Python language and there is a lot of new people who enter the programming world with Python for their own purpose so there are a lot of people who are not familiar with the concept of bits.
So I thought that the random module can become more friendly for those people.
And for example, Java/Scala already provides those high-level APIs (and there is a similar proposal at Go also: https://github.com/golang/go/issues/23804). but it does not mean that Python should provide the same APIs. And I know that we also have to consider the maintenance cost and the principle of library scope.
Anyway, this is the reason I proposed this feature and I want to hear the opinion from other core-devs :)
please let me know if I miss something or historical issue.
Enjoy your weekend. |
|
Date |
User |
Action |
Args |
2021-06-12 13:13:09 | corona10 | set | recipients:
+ corona10, rhettinger, mark.dickinson, steven.daprano, serhiy.storchaka |
2021-06-12 13:13:09 | corona10 | set | messageid: <1623503589.44.0.24858905701.issue44400@roundup.psfhosted.org> |
2021-06-12 13:13:09 | corona10 | link | issue44400 messages |
2021-06-12 13:13:09 | corona10 | create | |
|