[issue45669] An 'ascii_alphanumerics' variable is missing in the 'strings' lib

Paolo Melchiorre report at bugs.python.org
Sat Oct 30 18:09:27 EDT 2021


Paolo Melchiorre <paolo at melchiorre.org> added the comment:

Thank you all for the feedback, also I have been using python for years and contributing to other python-based projects it is my first PR to Cpython and I don't know if my contribution to the discussion is foreseen.

It seems to me that adding this constant does not cause any damage in fact it is an easy victory. However, I try to clarify some doubts raised.

I proposed this new variable to simplify the code in a use case that occurs very often, not so much to save some characters.

I think every single new variable, constant and function needed a waiting period before being used in packages that support different versions of python (ex: f-string in Python 3.6) but can be used in the code of projects that use the latest version of python or in the python code itself.

The definition of the alphanumeric constant in the standard libraries I believe can help to have a clearly defined common variable[1], which could be used as a basis for alphabets containing additional symbols (ex: _- =)

[1] https://en.wikipedia.org/wiki/Alphanumeric

----------

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


More information about the Python-bugs-list mailing list