r/ProgrammerHumor • • 16d ago

Meme python

Post image
10k Upvotes

62 comments sorted by

233

u/circ-u-la-ted 16d ago

import snek

379

u/nicer-dude 16d ago

Does he use snake_case or CamelCase? 🤔

158

u/circ-u-la-ted 16d ago

Well, he's Python, so what do you think?

61

u/DMoney159 16d ago

He got angry, so he's using SCREAMING_SNAKE_CASE

48

u/BetterEquipment7084 16d ago

PascalCase is that, camlCaseIsThis

5

u/MattieShoes 16d ago

I was thinking the same, though it gets a little blurry in practice

2

u/BetterEquipment7084 16d ago

Use the right names. As a pascal rnjoyer it irritates me when its mixed, also, same from my ocaml side

1

u/MattieShoes 16d ago

Classes are capitalized and objects are not...pascal case for classes and camelcase for objects? Or camelcase with a special rule for classes? But another rule for enums, and another for defines, and another for file names... Meh, just be consistent in your inconsistency.

But yeah, don't call it one when it's another.

1

u/BetterEquipment7084 16d ago

Use capital for globals, macros, enums, Pascal for everything else, with a postfix for structs

6

u/not_unabomber 16d ago

Only when it swallows an elephant

1

u/Faustalicious 16d ago

Screaming_Snake_Case

119

u/RefrigeratorThick475 16d ago • Heartwarming

CEO of python checking your python code

61

u/Slow-Television-5303 16d ago

but what about the Spanish inquisition

30

u/ChickenFeline0 16d ago

I was not expecting that

19

u/Lard_Denning 16d ago

nobody expects the Spanish Inquisition!

46

u/Outrageous_Pen_5165 16d ago

Code so shit the god himself had to spawn to fix it

24

u/a_bug_from_varkala 16d ago

He swallow his tail and then (most likely due to a circular import)

17

u/Sid_The_Geek 16d ago • Heartwarming

John Python, himself !!

13

u/tsoewoe 16d ago

it knows ball

1

u/someone_12421 16d ago

They're a ball python

11

u/Iyemoja 16d ago

Somewhere a junior just realized the snake is the senior dev on the team. He has been reviewing every PR in silence this whole time.

17

u/tatstytastycakes 16d ago

python meets python

12

u/Gold_Rdr 16d ago

Monty!!! It's MONTY PYTHON, not the damn snake!!

6

u/Disallowed_username 16d ago

Badger badger badger badger badger badger badger. 

4

u/junky_junker 16d ago

A snake a snaaake ... oooooh, it's a snake!

5

u/ParanoiaComplex 16d ago edited 16d ago

select_packets is just doing

scrambled_packets[-num_packets:][::-1] if num_packets > 0 else None

except when len(scrambled_packets) == 1 then it doesn't return a list? So I guess

result = packets[-num:][::-1] if num > 1 else (packets[-1] if num == 1 and packets else None)

6

u/TheHelixNebula 16d ago

except the fact that the function return type is T | list[T]| None is a massive code smell it should be list[T] or list[T] | None. T | list[T] is asking for breakage

1

u/ParanoiaComplex 16d ago

Yeah, agreed

1

u/RapidCatLauncher 16d ago

That one really got me. Writing out a loop for this whole thing, fine, simplicity/readability or whatever.

Three different return types, now that's a paddlin'.

4

u/Lard_Denning 16d ago

he speaks parsertongue

3

u/-suspended- 16d ago

Python is from Monty Python's Flying Circus. Bring in a comedian for best results.

4

u/NefariousEgg 16d ago

Python programming.

2

u/Ollomont 16d ago

John Python has entered the chat!

2

u/Saint_of_Grey 16d ago

I wrote in "python" once.

It was actually a C++ program where all the the procedures were called "hssss" with varying lengths of 's'.

2

u/theofficialnar 16d ago

Can you ask him why he hates the ‘{ }’ boys so much?

2

u/kathy_683 8d ago

Python lets braces in; they just don't get to run the blocks.

2

u/MinimumViableSloth 14d ago

checking its own code whether there is a bug

1

u/harper-841 8d ago

A missing colon after if raises a SyntaxError; the snake takes it personally.

4

u/Panderz_GG 16d ago

I have never touched python in my life. How do you guys do multi line statements?

9

u/WingZeroCoder 16d ago

lol, I thought you said “never touched a python” and for some reason my context couldn’t put that together with what your other words said for the longest time.

Multiline statements just use backslashes before the new line, similar to bash scripts.

But also, for list literals or dictionary literals, you can just break them up into new lines without the backslash escape. Similarly, you can use triple quotes for string literals.

2

u/Panderz_GG 16d ago

Thanks very much

3

u/BeMyBrutus 16d ago

I got too caught up looking at the code and totally missed the giant snake for about 45 seconds.

1

u/MagnumVY 16d ago

True Parseltongue

1

u/Ecklips_XD 16d ago

Mmm Deadlock in the task bar...

1

u/Spirited-Tomorrow-84 16d ago

Good good, keep listening.

1

u/Undernown 16d ago

The Snek is right on the money with being suspicious of that line.

IF num_packets < 2:

Would be a safer condition, just in case something weird gets returned in the recursive function.

1

u/MoreCoffee729 16d ago

ssssssstfu

1

u/Camman1 16d ago

Who revealed the ancient tongue to you human?

1

u/Professional-Day7850 16d ago

That's not Monty.

1

u/RandomSilentStranger 16d ago

A python made a snake game in python, well we don't see that very often.

1

u/Independent-Code9741 16d ago

god tier snake oil

1

u/aarocka 16d ago

Snoodle

1

u/Crimento 16d ago

What is this and how do I get rid of this

1

u/xubaso 16d ago

I was cluelessly reading the code for a full minute to find the joke

1

u/MorningStar_Rise 15d ago

good one boy

1

u/the_horse_gamer 15d ago

python is named after Monty Python

1

u/-__-Malik-__- 15d ago

"Ssssssss! Sssssss!"

1

u/R15H1_3 11d ago

He's just checking why you didn't use a list comprehension.

-4

u/BoarHermit 16d ago

https://m.youtube.com/watch?v=1TJeVIruOR4&pp=0gcJCVgCo7VqN5tD

Come cloer, bandarlogs

Soiviet cartoon Maugli (Book of jungle) was something else than sweet Disney's. Pyton Kaa was really scary.