[issue33228] Use Random.choices in tempfile

Raymond Hettinger report at bugs.python.org
Thu Apr 5 12:41:07 EDT 2018


Raymond Hettinger <raymond.hettinger at gmail.com> added the comment:

-0 on making anything other than the doc change.  For the most part, we avoid sweeping through the standard library to substitute-in new features and instead have a preference for code stability rather than code churn.

FWIW, the main rationale for introducing choices() was to support weighting.  Existing code that calls choice() multiple times is still correct and clear.

----------
nosy: +rhettinger

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue33228>
_______________________________________


More information about the Python-bugs-list mailing list