This is getting a little ridiculous.

If you can get by with a single literal list of words, write it once.
...if it's long enough to be annoying or becomes a maintenance burden, use the 
`split()` idiom.
...if that's considered a "hack" or "bad form", then run it in the shell once 
and copy/paste the result.
...if it might get mutated in a loop, copy it (words[:]). You'd be constructing 
a new one anyways.
...if it's just too long to maintain in code, just load it from a txt file once 
at runtime.

These are simple engineering solutions to simple engineering problems. As a 
bonus, they don't require implementation maintainers to redesign their 
tokenizers/parsers or build a brand-new preprocesser. 

Python-ideas truly is a unique, wonderful, exhausting place. Back to the 
"plus/pipe" thread (formerly known as the "PEP 584" thread)...
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/THBBTIQ34GYZSBW6PQXKKO3L3UADYBXB/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to