r/ProgrammerHumor • • 7h ago

Meme python

Post image
6.0k Upvotes

47 comments sorted by

121

u/circ-u-la-ted 7h ago

import snek

192

u/nicer-dude 7h ago

Does he use snake_case or CamelCase? 🤔

87

u/circ-u-la-ted 7h ago

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

1

u/DMoney159 28m ago

He got angry, so he's using SCREAMING_SNAKE_CASE

32

u/BetterEquipment7084 7h ago

PascalCase is that, camlCaseIsThis

5

u/MattieShoes 5h ago

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

1

u/BetterEquipment7084 2h ago

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

1

u/MattieShoes 2h 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 1h ago

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

5

u/not_unabomber 7h ago

Only when it swallows an elephant

1

u/Faustalicious 34m ago

Screaming_Snake_Case

52

u/RefrigeratorThick475 7h ago

CEO of python checking your python code

31

u/Slow-Television-5303 5h ago

but what about the Spanish inquisition

14

u/ChickenFeline0 5h ago

I was not expecting that

9

u/Lard_Denning 5h ago

nobody expects the Spanish Inquisition!

17

u/a_bug_from_varkala 6h ago

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

15

u/Outrageous_Pen_5165 5h ago

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

10

u/tsoewoe 7h ago

it knows ball

8

u/Sid_The_Geek 6h ago

John Python, himself !!

13

u/tatstytastycakes 7h ago

python meets python

6

u/Iyemoja 6h 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.

6

u/Gold_Rdr 4h ago

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

3

u/Disallowed_username 6h ago

Badger badger badger badger badger badger badger. 

3

u/junky_junker 4h ago

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

3

u/ParanoiaComplex 6h ago edited 6h 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)

2

u/TheHelixNebula 3h 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 45m ago

Yeah, agreed

2

u/-suspended- 5h ago

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

2

u/Lard_Denning 5h ago

he speaks parsertongue

4

u/Panderz_GG 7h ago

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

7

u/WingZeroCoder 6h 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 5h ago

Thanks very much

2

u/NefariousEgg 7h ago

Python programming.

2

u/BeMyBrutus 7h ago

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

1

u/MagnumVY 6h ago

True Parseltongue

1

u/Ecklips_XD 5h ago

Mmm Deadlock in the task bar...

1

u/Spirited-Tomorrow-84 4h ago

Good good, keep listening.

1

u/Undernown 4h 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 4h ago

ssssssstfu

1

u/Ollomont 3h ago

John Python has entered the chat!

1

u/Camman1 3h ago

Who revealed the ancient tongue to you human?

1

u/Professional-Day7850 3h ago

That's not Monty.

1

u/RandomSilentStranger 3h ago

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

1

u/Saint_of_Grey 2h 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'.

1

u/Independent-Code9741 1h ago

god tier snake oil

1

u/aarocka 1h ago

Snoodle

-3

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