On Wed, Oct 23, 2019 at 10:09:41AM -0400, David Mertz wrote:

> One big problem with the current obvious way would be shared by the
> proposal. This hits me fairly often.
> 
> colors1 = "red green blue".split()  # happy
> 
> Later
> 
> colors2 = "cyan   forest green  burnt umber".split()
> # oops, not what I wanted, quote each separately

It isn't shared by the proposal.

  colors2 = %w[cyan   forest green  burnt\x20umber]


Escaping the space ``\ `` might be nicer, but escaping an invisible 
character is problematic (see the problems with the explict line 
continuation character ``\``) and we may not be able to add any new 
escape characters to the language. However a hex escape will do the 
trick.


-- 
Steven
_______________________________________________
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/TCIWZCAPCIQJA2LMAKK6H4TWQNBJPUU7/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to