[Python-ideas] Proposal: Tuple of str with w'list of words'

Random832 random832 at fastmail.com
Wed Dec 7 01:44:29 EST 2016


On Tue, Dec 6, 2016, at 20:03, Steven D'Aprano wrote:
> > I also have an alternate idea: sl{word1 word2 'string 3' "string 4"}
> 
> Why "sl"?

Well, shlex was one of the inspirations.

> That looks like a set or a dict. Its bad enough that w-strings return a 
> list, but to have "sl-sets" return a list is just weird :-)

My idea was to have word{...} as a grand unifying solution for "we want
a new kind of literal but can't think of a syntax for it that doesn't
either look like grit on the screen or already means something", with
this as one of the first examples. I think it's better than using
word"..." for things that aren't strings.


More information about the Python-ideas mailing list