In PEP8 Guide 2. Is 79 characters are inclusive/exclusive of spaces " " ? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

In PEP8 Guide 2. Is 79 characters are inclusive/exclusive of spaces " " ?

"Wrap lines so that they don’t exceed 79 characters."

4th Jun 2021, 3:53 AM
lisa
7 Answers
+ 2
Google Python Style Guide says 80 characters. 3.2 Line length Maximum line length is 80 characters. Explicit exceptions to the 80 character limit: Long import statements. URLs, pathnames, or long flags in comments. Long string module level constants not containing whitespace that would be inconvenient to split across lines such as URLs or pathnames. https://google.github.io/styleguide/pyguide.html
4th Jun 2021, 4:13 AM
David Ashton
David Ashton - avatar
+ 1
David Ashton or maybe it is facebook or another big firm ;P
4th Jun 2021, 4:14 AM
visph
visph - avatar
+ 1
lisa 3.2 is the paragraph number in the style guide. Check the link 🙂
4th Jun 2021, 4:25 AM
David Ashton
David Ashton - avatar
0
79 including spaces... however, don't focus too much on PEP8: that's just recommendations... each compagnie could have its own formating rules, as well as each coders ^^ (google says 120 I believe)
4th Jun 2021, 3:58 AM
visph
visph - avatar
0
the fact is: PEP8 are only recommendations/conventions...
4th Jun 2021, 4:19 AM
visph
visph - avatar
0
David Ashton What is 3.2 line length ? How can we measure line length ?
4th Jun 2021, 4:20 AM
lisa
0
line length count all chars (including invisible chars) until the new line char...
4th Jun 2021, 4:21 AM
visph
visph - avatar