Python Forum
is this bad documentation?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
is this bad documentation?
#1
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.
Reply
#2
I think it doesn't say it because it is obvious: python expressions never cross line boundaries unless there is some enclosing () [] or {} block or triple quotes for literal strings.
Reply
#3
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.
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020