lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]





-------- Forwarded Message --------
Subject: Re: Fwd: Heritage of Lua syntax for multi-line strings and comments
Date: Fri, 24 Nov 2023 21:13:38 +0100
From: Claudio Grondi <claudio.grondi@freenet.de>
To: lua-l@lists.lua.org



On 11/24/23 20:22, bil til wrote:
Am Fr., 24. Nov. 2023 um 20:17 Uhr schrieb Claudio Grondi
<claudio.grondi@freenet.de>:
''' multiline string
                                 first level '''
This looks somehow funny, this really works well in Python?

... just wondering how they distinguish empty strings "" from this
start sign of a multiline string ...
concatenating
        unnamed string literals in Python

The "magic" is based on the possibility of implicit concatenation of subsequent strings into one and allowing unnamed strings to occur everywhere in code text making following piece of script `a=1; "a is set to 1"; b=2` valid Python code.