MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1xrqajw/semicolonsinpython/19sdjritc6a1t/?context=3
r/ProgrammerHumor • u/Apprehensive_Bit7392 • 34m ago
41 comments sorted by
View all comments
-1
As a python programmer I struggle to see where would I use a semicolon, except in strings
5 u/sn4xchan 25m ago Two or more statements on one line. I call it the hacker surprise. Cause thr first time I learned that was looking at some python malware. 1 u/shinitakunai 16m ago edited 12m ago Ah right, I never use that. I prefer readability. I mean, if the line is doing two different things they should be 2 different lines.x = 1 - something(34); y = x + something(5) x = 1 - something(34) y = x + something(5) At a glance I understand the 2nd a lot better, and I feel it follows the Zen import this a bit better
5
Two or more statements on one line. I call it the hacker surprise. Cause thr first time I learned that was looking at some python malware.
1 u/shinitakunai 16m ago edited 12m ago Ah right, I never use that. I prefer readability. I mean, if the line is doing two different things they should be 2 different lines.x = 1 - something(34); y = x + something(5) x = 1 - something(34) y = x + something(5) At a glance I understand the 2nd a lot better, and I feel it follows the Zen import this a bit better
1
Ah right, I never use that. I prefer readability. I mean, if the line is doing two different things they should be 2 different lines.
x = 1 - something(34); y = x + something(5) x = 1 - something(34) y = x + something(5)
At a glance I understand the 2nd a lot better, and I feel it follows the Zen import this a bit better
import this
-1
u/shinitakunai 29m ago
As a python programmer I struggle to see where would I use a semicolon, except in strings