gh-143700: document secrets.DEFAULT_ENTROPY as an opaque value#144568
gh-143700: document secrets.DEFAULT_ENTROPY as an opaque value#144568picnixz wants to merge 4 commits intopython:mainfrom
secrets.DEFAULT_ENTROPY as an opaque value#144568Conversation
|
I'm a bit unsure where to really put the name of that constant. I do want users to be able to use the constant itself but I don't want them to change it. Should I add an additional note saying that the value should not be changed? |
gpshead
left a comment
There was a problem hiding this comment.
I'm a bit unsure where to really put the name of that constant. I do want users to be able to use the constant itself but I don't want them to change it. Should I add an additional note saying that the value should not be changed?
that's probably overthinking it, we have all sorts of constants in Python modules that if changed will cause bad behavior - I don't think any special callout is necessary.
if we wanted to prevent it from being changed that'd require getting too creative with the module dict or using a C extension module instead. We rejected PEP-726 that could've offered an ability because the actual need was so rare.
Co-authored-by: Gregory P. Smith <68491+gpshead@users.noreply.github.com>
📚 Documentation preview 📚: https://cpython-previews--144568.org.readthedocs.build/