I think we’re agreeing. Looks like I need to clarify my last post a little.
When I included the following strings:
let longstring = """\
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do
eiusmod \
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad
minim veniam, \
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea
commodo consequat.\
"""
print( """\
Usage: myapp <options>
Run myapp to do mything
Options:
-myoption - an option
""" )
These were expressed in term of the proposal after last nights changes.
By advocating option 2) I’m accepting we should revert back to the following:
let longstring = """
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do
eiusmod \
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad
minim veniam, \
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea
commodo consequat.\
"""
print( """
Usage: myapp <options>
Run myapp to do mything
Options:
-myoption - an option
""” )
> 1) Proposal as it stands - no magic removal of leading/training blank lines.
> 2) Removal of a leading blank line when indent stripping is being applied.
> 3) Removal of leading blank line and trailing newline when indent stripping
> is being applied.
Also, note: the toolchain does not seem to work at all with playgrounds. I’ve
been using small test apps.
> On 12 Apr 2017, at 21:06, Adrian Zubarev via swift-evolution
> <[email protected]> wrote:
>
> Exactly, I feel like we found a Swifty version of a multi-line string
> literal. :)
>
>
>
>
> --
> Adrian Zubarev
> Sent with Airmail
>
> Am 12. April 2017 um 21:58:37, Vladimir.S via swift-evolution
> ([email protected] <mailto:[email protected]>) schrieb:
>
>> this:
>> """
>> one
>> two
>> """
>> should be just the same as "one\ntwo\n"
>>
>> If one wants some advanced tuning of line ends, he/she can use a backslash,
>> for example
>> """
>> one
>> two\
>> """
>> should produce "one\ntwo"
>
>
> _______________________________________________
> swift-evolution mailing list
> [email protected] <mailto:[email protected]>
> https://lists.swift.org/mailman/listinfo/swift-evolution
> <https://lists.swift.org/mailman/listinfo/swift-evolution>
_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution