7 Dec
2016
7 Dec
'16
6:44 a.m.
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.