Posts: 4,653
Threads: 1,496
Joined: Sep 2016
i can't get the documentation quoted here from the 3.5.2 PDF document. but reading the text at 2.4.2 String literal concatenation, it does not say that the concatenation must be in parenthesis in order to concatenate across a line boundary. so it did tests because it thought it was required. it does indeed seem to be required. but the language reference i have for 3.5.2 in PDF format does not say this. it does show an example with parenthesis and that might be enough of a hint. are other version documentation also missing this?
Tradition is peer pressure from dead people
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Posts: 4,653
Threads: 1,496
Joined: Sep 2016
as someone who has seen the diversity of quite many languages, i never consider something like this to be obvious. i do consider whether or not it can be made compilable and/or interpretable. this can be either way, so that would not force an implication to be one way, only. that's why i considered the documentation text to be inconsistent with test results.
but, perhaps it doesn't say it their because it says it somewhere else (python expressions never cross line boundaries). then this would be more a tutorial (expecting the reader to read it in sequence ... each part assumes all previous parts have been read) than a reference (look up the part you need to find out more/details about).
OTOH, i have never seen a language that allows things to span lines without also allowing them to span a whitespace. so i assume """ can't span lines because it can't be like "" ".
Tradition is peer pressure from dead people
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.