← every case · 2000 · string forms
a triple quoted string that is data the program prints and not documentation, with its opening symbol at the start of a line. Case 2090 is the same shape where the block really is documentation
| 1 | codecodecodecodecode | data = ( |
| 2 | commentscodecodecommentscode | """ |
| 3 | commentscodecodecommentscode | alpha |
| 4 | commentscodecodecommentscode | """ |
| 5 | codeextracodecodecode | ) |
| 6 | codecodecodecodecode | print(data) |
stringcommentthe tag around another language
a triple quoted string is documentation wherever it opens, so the three lines of this block are comments although the program prints their text
cloc --json cases/2000-string_forms/2100-triple_quoted_data_not_documentation/input.py
mezura cases/2000-string_forms/2100-triple_quoted_data_not_documentation/input.py --output json --hide timing --counting content
mezura cases/2000-string_forms/2100-triple_quoted_data_not_documentation/input.py --output json --hide timing --counting region
the same definition reaches a block that is data the program prints, so three lines of program data land in the comment count
scc --format json cases/2000-string_forms/2100-triple_quoted_data_not_documentation/input.py
tokei --output json cases/2000-string_forms/2100-triple_quoted_data_not_documentation/input.py