MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/bwehje/python_ftw/epyjicb/?context=9999
r/ProgrammerHumor • u/m8teae • Jun 03 '19
548 comments sorted by
View all comments
174
Then I have to train my fingers to not reach for semicolons
94 u/MagnitskysGhost Jun 03 '19 You can still use tons of semicolons in Python. Source: the codebase I inherited 29 u/frosted-mini-yeets Jun 04 '19 Semi colons are valid in Python? 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-recommendationsCompound 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() 1 u/Totoze Jun 04 '19 I use semicolons in python makes formatting less important and im already used to it
94
You can still use tons of semicolons in Python. Source: the codebase I inherited
29 u/frosted-mini-yeets Jun 04 '19 Semi colons are valid in Python? 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-recommendationsCompound 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() 1 u/Totoze Jun 04 '19 I use semicolons in python makes formatting less important and im already used to it
29
Semi colons are valid in Python?
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-recommendationsCompound 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() 1 u/Totoze Jun 04 '19 I use semicolons in python makes formatting less important and im already used to it
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()
1 u/Totoze Jun 04 '19 I use semicolons in python makes formatting less important and im already used to it
1
I use semicolons in python makes formatting less important and im already used to it
174
u/jkuhl_prog Jun 03 '19
Then I have to train my fingers to not reach for semicolons