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

2021-11-02 Thread Terry J. Reedy
Terry J. Reedy added the comment: Serhiy, thanks for the list. I can see it as either justifying or refuting the proposal. So +-1 for the moment. (I opened #45692 to eliminate the duplication in idlelib.) -- nosy: +terry.reedy ___ Python tracker

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

2021-10-30 Thread Paolo Melchiorre
Paolo Melchiorre 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

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

2021-10-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I was also against this feature. My reasons: 1. There will be not much benefit. ascii_alphanumerics is too long, so there is no much saving of typing. There is larger chance of typo. You will be not able to use it for several years, until support of Python

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

2021-10-30 Thread Dong-hee Na
Dong-hee Na added the comment: @skip.montanaro I agree with your concern, if authors want to use this constant, they need to use the mentioned workaround to import it. But we already have cases that add such constants if we considered them as useful constants. So I think that the main concer

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

2021-10-30 Thread Skip Montanaro
Skip Montanaro added the comment: I'll be the wet blanket here and say -1. This doesn't seem at all necessary. 81 occurrences in ~3.5k PyPI packages? That's a hardly overwhelming endorsement. To top it off, since this can't be backported to 3.10 and earlier, it creates a needless (trivial) d

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

2021-10-29 Thread Dong-hee Na
Dong-hee Na added the comment: I always need to write trivial code to generate fixed-length random strings with ascii_alphanumerics. It will solve similar usages and help a lot of packages. -- ___ Python tracker

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

2021-10-29 Thread Dong-hee Na
Dong-hee Na added the comment: +1 to me also -- nosy: +corona10 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscrib

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

2021-10-29 Thread Batuhan Taskaya
Batuhan Taskaya added the comment: I've found 81 occurrences of this pattern among 52 projects on a dataset of top PyPI packages (~3.5K). So I'd say +1 on including this. -- nosy: +BTaskaya ___ Python tracker _

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

2021-10-29 Thread Paolo Melchiorre
Change by Paolo Melchiorre : -- keywords: +patch pull_requests: +27586 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29317 ___ Python tracker ___

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

2021-10-29 Thread Paolo Melchiorre
New submission from Paolo Melchiorre : It is very common to construct a variable containing alphanumeric values as a basis for generating random strings, especially in the web environment as a slug to be used in URLs: >>> import string >>> ascii_alphanumerics = string.ascii_letters + string.d