On Mon, May 11, 2015 at 6:53 PM, Carlo Miron <mi...@python.it> wrote:
> Il 11 maggio 2015 17:58, Manlio Perillo <manlio.peri...@gmail.com> ha > scritto: > > > > [...] > > In yaml puoi avere anche dell'indentazione all'inizio di ogni riga, che > > viene ignorata. > > 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. > > > [...] Se insisti abbastanza, puoi scrivere il kernel di Linux in brainfuck... :-) > # 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.\ > """ > > Il problema è " they will both be trimmed", quindi se fai il load + dump di quel documento, ottieni un testo diverso; che è lo stesso problema di YAML. Ciao Manlio
_______________________________________________ Python mailing list Python@lists.python.it http://lists.python.it/mailman/listinfo/python