← every case · 2000 · string forms
a triple quoted string opened on one line and closed on another keeps the lines between out of the comment count, since a string is not a comment
| 1 | codecodecodecodecode | a = """one""" |
| 2 | codecodecodecodecode | b = """two |
| 3 | codecodecodecodecode | still inside the docstring |
| 4 | codecodecodecodecode | """ |
| 5 | commentscommentscommentscommentscomments | # a real comment |
stringcommentthe tag around another language
a triple quoted string is read as documentation wherever it opens, the middle of a line of code included, so the lines holding its text and its closing quotes are added to the comment count
cloc --json cases/2000-string_forms/2080-odd_triple_quote_count/input.py
mezura cases/2000-string_forms/2080-odd_triple_quote_count/input.py --output json --hide timing --counting content
mezura cases/2000-string_forms/2080-odd_triple_quote_count/input.py --output json --hide timing --counting region
scc --format json cases/2000-string_forms/2080-odd_triple_quote_count/input.py
tokei --output json cases/2000-string_forms/2080-odd_triple_quote_count/input.py