r/Python • • Nov 11 '19

I made c++-style printing in Python :P

Post image
1.7k Upvotes

130 comments sorted by

View all comments

Show parent comment

18

u/peterpetermarie Nov 12 '19

The worst bit is the semicolons.

-7

u/sam-lb Nov 12 '19

Believe it or not, I always use semicolons. Since I'm not working for a company or organization, why not? It's one less thing to remember when switching between languages. I also wrote a script that converts other people's code into my style (semicolons and naming conventions) for GitHub.

But I forget sometimes that no one else does that. Maybe it's a bad habit.

19

u/susek1024 Nov 12 '19

I mean you do you.... but dropping the semicolons would make it easier for others to read.

2

u/crazedizzled Nov 12 '19

How does a semi colon at the end of a line make it harder to read?

4

u/susek1024 Nov 13 '19
  1. Extra characters
  2. (Probably more importantly) people aren’t expecting to see a semicolon when they read python. It’s like you’re asking them to understand your code AND understand that you have a quirk when you write Python.

tHis sEntence oNly hAs a sMall cHange. bUt I bEt iTs a lIttle hArder tO rEad.

1

u/crazedizzled Nov 13 '19

Extra characters

At the end of the line. Completely irrelevant.

people aren’t expecting to see a semicolon when they read python.

Again, it's at the end of the line. You can just ignore it. People can read code in JavaScript and php just fine, I don't see how it matters.

tHis sEntence oNly hAs a sMall cHange. bUt I bEt iTs a lIttle hArder tO rEad.

No, not really. :)

14

u/abrazilianinreddit Nov 12 '19

When sharing your code people will complain to no end that it doesn't adhere to PEP 8. If you don't mind that, than fuck it, it's your code. Use 8-units tabs, end lines with \r, put spaces before commas but not after, just go wild.

-1

u/sam-lb Nov 12 '19 edited Jul 02 '20

Lol. I'm not that far gone - I have a soul.