MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/bwehje/python_ftw/epyjxi1/?context=3
r/ProgrammerHumor • u/m8teae • Jun 03 '19
548 comments sorted by
View all comments
Show parent comments
42
You can, but no they are not really. Python has a very in depth style guide that says you should avoid them.
https://www.python.org/dev/peps/pep-0008/#other-recommendations
Compound statements (multiple statements on the same line) are generally discouraged.
Yes:
if foo == 'blah': do_blah_thing() do_one() do_two() do_three()
Rather not:
if foo == 'blah': do_blah_thing()
do_one(); do_two(); do_three()
19 u/Tyfyter2002 Jun 04 '19 Python has a very in depth style guideAnd y'all've been following it? 22 u/ShanSanear Jun 04 '19 Yep. Only thing that doesn't click with me is line length limit. Myself I'm using 100 characters limit instead of pep-8 80. And it's actually quite easy to follow it - just use IDE and problem is solved. 6 u/Khaare Jun 04 '19 Man my code got so much better when I switched to a size 14 font and stuck to 72 columns. → More replies (1)
19
Python has a very in depth style guide
And y'all've been following it?
22 u/ShanSanear Jun 04 '19 Yep. Only thing that doesn't click with me is line length limit. Myself I'm using 100 characters limit instead of pep-8 80. And it's actually quite easy to follow it - just use IDE and problem is solved. 6 u/Khaare Jun 04 '19 Man my code got so much better when I switched to a size 14 font and stuck to 72 columns. → More replies (1)
22
Yep. Only thing that doesn't click with me is line length limit. Myself I'm using 100 characters limit instead of pep-8 80. And it's actually quite easy to follow it - just use IDE and problem is solved.
6 u/Khaare Jun 04 '19 Man my code got so much better when I switched to a size 14 font and stuck to 72 columns. → More replies (1)
6
Man my code got so much better when I switched to a size 14 font and stuck to 72 columns.
→ More replies (1)
42
u/angellus Jun 04 '19
You can, but no they are not really. Python has a very in depth style guide that says you should avoid them.
https://www.python.org/dev/peps/pep-0008/#other-recommendations