Il 11 maggio 2015 17:58, Manlio Perillo <manlio.peri...@gmail.com> ha scritto:
> 2015-05-11 17:31 GMT+02:00 Carlo Miron <mi...@python.it>: >> >> Il 11 maggio 2015 17:01, Manlio Perillo <manlio.peri...@gmail.com> ha >> scritto: >> > Che io sappia, TOML non ha una sintassi conveniente per introdurre testo >> > multi linea. >> >> Vuoi dire che >> >> str1 = """ >> Roses are red >> Violets are blue""" >> >> non è un formato conveniente? A me ricorda molto il conveniente >> formato adottato da un linguaggio di programmazione che non nominerò >> perché troppo in-topic per questa lista :P > > In yaml puoi avere anche dell'indentazione all'inizio di ogni riga, che > viene ignorata. > Avere qualcosa come: > > foo = """ > Roses are red > Violets are blue""" > > è meno leggibile, almeno per me, di > > foo: | > Roses are red > Violets are blue If the first characters after the opening delimiter are a backslash and a newline, then they will both be trimmed along with all whitespace and newlines up to the next non-whitespace character or closing delimiter. # The following strings are byte-for-byte equivalent: str1 = "The quick brown fox jumps over the lazy dog." str2 = """ The quick brown \ fox jumps over \ the lazy dog.""" key3 = """\ The quick brown \ fox jumps over \ the lazy dog.\ """ © -- |:**THE BEER-WARE LICENSE** (Revision 42): | <mi...@python.it> wrote this mail. As long as you retain | this notice you can do whatever you want with this stuff. | If we meet some day, and you think this stuff is worth it, | you can buy me a beer in return. | --Carlo Miron : _______________________________________________ Python mailing list Python@lists.python.it http://lists.python.it/mailman/listinfo/python