Todd wrote: > On Tue, Oct 22, 2019 at 3:54 PM Steve Jorgensen ste...@stevej.name wrote: > > See > I am not seeing the advantage of this. Can you provide some specific > examples that you think would benefit from this syntax? > For the example you gave, besides saving a few characters I don't see the > advantage over the existing way we have to do that: > 'one two three'.split()
No. It really doesn't provide much benefit beyond that. > Python usually uses [ ] for list creation or indexing. Co-opting it for a > substantially different purpose of string processing like this doesn't > strike me as a good idea, especially since we have two string identifiers > already, ' and ". Actually, in Ruby, the surrounding character pair can be pretty much anything `, and in practice, curly braces are often used. From https://en.wikibooks.org/wiki/Ruby_Programming/Syntax/Literals#The_%_Notation : > Any single non-alpha-numeric character can be used as the delimiter, > `%[including these]`, `%?or these?`, `%~or even these things~`. By using > this notation, the usual string delimiters `"` and `'` can appear in the > string > unescaped, but of course the new delimiter you've chosen does need to be > escaped. However, if you use `%(parentheses)`, `%[square brackets]`, > `%{curly brackets}` or `%<pointy brackets>` as delimiters then those same > delimiters can appear unescaped in the string as long as they are in balanced > pairs… _______________________________________________ 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/U2LHHFXXQLWJ7JABIFE5HPIYXI427PV6/ Code of Conduct: http://python.org/psf/codeofconduct/