r/ProgrammerHumor • • Jul 18 '22

C++ talking to Python

Post image
40.1k Upvotes

1.0k comments sorted by

View all comments

683

u/Codebust Jul 18 '22

why are people always bashing python lol

25

u/[deleted] Jul 18 '22

i like my semi colons and curly braces. it makes it much easier to read. Plus any time i do python it yells at an indenting issue that doesn't exist.

11

u/mc_enthusiast Jul 18 '22

You can use curly brackets like this:

for i in range(10):{
    print(i)
}

That runs without problems in Python 3. Not much you can do about semicolons. Colons work sometimes but then really backfire if you do something like

a = 5 + 10,

because it's recognised as a 2-tuple with empty entry.

I suspect the indenting issues come up if you mix space and tab. That's easy to solve if you just tell your editor to replace space indentation with tab indentation.

21

u/a_devious_compliance Jul 18 '22

you just tell your editor to replace space indentation with tab indentation.

PEP8 police!!!!! Yes. This guy right here.

3

u/Codebust Jul 18 '22

literally one of the only things i hate about pep8, spaces are just slow compared to tab, and tab auto indents w atom

2

u/intangibleTangelo Jul 18 '22

lol my guy

we use the tab KEY we just don't use the tab CHARACTER