Eric V. Smith <[email protected]> added the comment:
I remain unconvinced, but I'm only one person. You might want to bring this up on python-ideas to see if it can get some more support. But be aware this is going to have much less support that the recent PEP 616 removeprefix/removesuffix discussion, which went on for weeks or months, and involved writing a PEP. While the Wikipedia page you cite discusses how to convert a string of words into snake case, a PEP will require much more detail. Just a few off the top of my head: What happens to multiple space: does that become a single underscore, or multiple? Is all whitespace converted to underscores, including newlines and tabs? Does it work if the string is already in CamelCase? I also don't think swapcase or capitalize (plus some others) would be added today if they didn't already exist. To me, this seems like something that belongs on PyPI (like https://pypi.org/project/stringcase/), and not in the standard library. ---------- _______________________________________ Python tracker <[email protected]> <https://bugs.python.org/issue40437> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
