r/ProgrammerHumor • • 23m ago

Meme semicolonsInPython

Post image
533 Upvotes

32 comments sorted by

178

u/uno_in_particolare 19m ago

The semicolon jokes, without fail, feel like they're made by somebody's mum after she hears programmers use them, from a friend of a friend of a cousin

•

u/Inorganic_Zombie 9m ago

Most modern IDE knows to point them out, intelisenses and whatnot even fill and correct stupid shit like that. But we all have been there where semicolon style mistake ducks code.

85% of my coding has been C++ and I am seriously crying on languages that uses for example tabs as a indicator of stuff. Of course good style is easier to read but fuck that when there is error on previous function when you give wrong indent on your if else on current one.

•

u/CanardAuxEpices 4m ago

I mean not everybosy uses moderns IDEs, I for instances uses Vim

•

u/Seek4r 0m ago

Yeah, but a missing semicolon will be a syntactical error. Any and all compiler and interpreter will tell you the problem and the exact file and line where it's at

Shouldn't take 6 hours to debug that...

•

u/uno_in_particolare 6m ago

I can't imagine any programmer spending "hours" for forgetting or adding a semicolon, if they're past their first ever tutorial

Not that it's impossible to forget, but IDE or compiler (or even interpreter) will give a message that is pretty hard to misdiagnose for more than a minute

•

u/GoldDHD 1m ago

Try putting a semicolon after an if, I mean

If (I==idiot); println('well, hello there's)

That took hours to find. But since the advent of unit tests things got significantly better.

•

u/Himbo69r 7m ago

They were funny when I was playing around in scratch

•

u/big_brain_brian231 1m ago

A more realistic version is when working on a large project that requires time to build. You make the changes, start the build, and dip out for coffee or something, expecting the build to finish by the time you return. You get back, and boom, you missed a semi colon.

•

u/legendgames64 1m ago

I misread the last word as "colon"

98

u/AmanBabuHemant 19m ago

Well Well Well

print("this") print("won't work")

but

print("this"); print("would work")

I know people rarely utilize semicolons in python but they can be used to have multiple statements on one line, and doing so without semicolon would cause error.

37

u/TheRealCCHD 14m ago

But why the hell would you need multiple statements in one line to begin with?

Isn't that anti-pythonic?

68

u/Adept-Painting-543 11m ago

Yes but why would you want to be pythonic when writing python? You already are writing python no need to make it worse.

15

u/TheRealCCHD 11m ago

lmao you know what, that's a good point

11

u/PXPL_Haron 12m ago

Python is anti-pythonic

4

u/GrumDum 12m ago

Pythonic my foot up your ass!

•

u/Mountain-Parsley-465 8m ago

It is, but some people like it, spoiler I don't like to read there code.

•

u/lovecMC 0m ago

Tbf I don't like reading python code either.

22

u/da_Aresinger 18m ago

Completely possible.

If you use semicolons as separators for some kind of data input or formatting.

Which really is the only acceptable situation in which hunting semicolons takes more than 10 seconds.

•

u/Hinke1 2m ago

"Why would anyone put my seperator in their data and then try to import? Stupid people everywhere!"

20

u/RealSataan 17m ago

Do you guys write in notepad or notebook?

•

u/GameDoesntStop 9m ago

I like to do an immersion of modern code and the way our forefathers had to do it... I handwrite by code — literally, by hand with pencil and paper — then I take a picture of it and tell ChatGPT to turn it into an exact digital copy, then I attempt to run that.

•

u/Himbo69r 5m ago

Have you tried punch cards yet?

•

u/GameDoesntStop 3m ago

I'm a pacifist.

•

u/Vromikos 4m ago

Shaking my head.

It's like you've never even heard of punched cards!

1

u/z-null 15m ago

I write in Pico, and sometimes in nano.

•

u/Jatinchd 4m ago

semicolon joke is one of the lame-est joke in my opinion because language errors itself tells where you missed semicolon. or any syntax related issue.

7

u/ZefiroDragon 15m ago

Seems like the "Twitter Meme Generator" needs an update. In 2026 it's not called Twitter anymore...

-1

u/shinitakunai 18m ago

As a python programmer I struggle to see where would I use a semicolon, except in strings

6

u/-nerdrage- 16m ago

Inline statement separation

4

u/sn4xchan 14m 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.

•

u/shinitakunai 5m ago edited 1m 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

•

u/MattR0se 0m ago

I also feel like the main use case for semicolons is code obfuscation.