r/ProgrammerHumor • • 10d ago

Meme python

Post image
10k Upvotes

62 comments sorted by

232

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

import snek

379

u/nicer-dude 10d ago

Does he use snake_case or CamelCase? 🤔

158

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

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

61

u/DMoney159 10d ago

He got angry, so he's using SCREAMING_SNAKE_CASE

48

u/BetterEquipment7084 10d ago

PascalCase is that, camlCaseIsThis

5

u/MattieShoes 10d ago

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

2

u/BetterEquipment7084 10d ago

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

1

u/MattieShoes 10d 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 10d ago

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

6

u/not_unabomber 10d ago

Only when it swallows an elephant

1

u/Faustalicious 10d ago

Screaming_Snake_Case

119

u/RefrigeratorThick475 10d ago • Heartwarming

CEO of python checking your python code

60

u/Slow-Television-5303 10d ago

but what about the Spanish inquisition

30

u/ChickenFeline0 10d ago

I was not expecting that

19

u/Lard_Denning 10d ago

nobody expects the Spanish Inquisition!

46

u/Outrageous_Pen_5165 10d ago

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

24

u/a_bug_from_varkala 10d ago

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

17

u/Sid_The_Geek 10d ago • Heartwarming

John Python, himself !!

13

u/tsoewoe 10d ago

it knows ball

1

u/someone_12421 9d ago

They're a ball python

10

u/Iyemoja 10d 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 10d ago

python meets python

12

u/Gold_Rdr 10d ago

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

5

u/Disallowed_username 10d ago

Badger badger badger badger badger badger badger. 

4

u/junky_junker 10d ago

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

5

u/ParanoiaComplex 10d ago edited 10d 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 10d 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 10d ago

Yeah, agreed

1

u/RapidCatLauncher 9d 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 10d ago

he speaks parsertongue

3

u/-suspended- 10d ago

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

4

u/NefariousEgg 10d ago

Python programming.

2

u/Ollomont 10d ago

John Python has entered the chat!

2

u/Saint_of_Grey 10d 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 10d ago

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

2

u/kathy_683 2d ago

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

2

u/MinimumViableSloth 8d ago

checking its own code whether there is a bug

1

u/harper-841 2d ago

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

4

u/Panderz_GG 10d ago

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

8

u/WingZeroCoder 10d 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 10d ago

Thanks very much

3

u/BeMyBrutus 10d ago

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

1

u/MagnumVY 10d ago

True Parseltongue

1

u/Ecklips_XD 10d ago

Mmm Deadlock in the task bar...

1

u/Spirited-Tomorrow-84 10d ago

Good good, keep listening.

1

u/Undernown 10d 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 10d ago

ssssssstfu

1

u/Camman1 10d ago

Who revealed the ancient tongue to you human?

1

u/Professional-Day7850 10d ago

That's not Monty.

1

u/RandomSilentStranger 10d ago

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

1

u/Independent-Code9741 10d ago

god tier snake oil

1

u/aarocka 10d ago

Snoodle

1

u/Crimento 10d ago

What is this and how do I get rid of this

1

u/xubaso 9d ago

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

1

u/MorningStar_Rise 9d ago

good one boy

1

u/the_horse_gamer 9d ago

python is named after Monty Python

1

u/-__-Malik-__- 9d ago

"Ssssssss! Sssssss!"

1

u/R15H1_3 5d ago

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

-4

u/BoarHermit 10d 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.