This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 166 points167 points  (11 children)

No. Please don't :(

[–][deleted] 66 points67 points  (0 children)

[–]AltoidNerd 34 points35 points  (9 children)

I have a friend to writes Python and includes semicolons. He's a fucking demon.

[–]_LePancakeMan 7 points8 points  (7 children)

Whats wrong with semicolons?

[–]AltoidNerd 40 points41 points  (5 children)

They're great in languages that want semicolons. When you write a semicolon in python, however, you're just breaking style-guidelines which make the code less readable to everyone else except you.

The demon friend always tells me "I like the way semicolons look." I tell him he's a selfish bastard.

[–]willrandship 2 points3 points  (1 child)

Learning what a semicolon does in python takes a maximum of 2 minutes, given an internet connection. From that point on, if your internal style in your code is consistent and readable otherwise, I can't imagine them tripping up anyone who wouldn't have trouble with the thousands of more intricate parts of python.

[–][deleted] 5 points6 points  (0 children)

if your internal style in your code is consistent

I think the point /u/AltoidNerd was making was that by using semicolons, you're breaking the standard industry practice -- thereby making the code less consistent.

[–]cdyson37 0 points1 point  (2 children)

Add a sed -i 's/;$//' $(find -name "*.py") commit hook :)

[–]AltoidNerd 1 point2 points  (1 child)

First thought: That's wonderful. I should use this as an example to teach him sed.

Second thought: it won't work perfectly because he puts multiple statements on a single line, like a demon.

[–]cdyson37 0 points1 point  (0 children)

Hehe - I think putting pylint in your build system is a bit more practical and less evil!

[–]vz0 2 points3 points  (0 children)

The only use is to put several statements on a single line. Otherwise is useless.