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.
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
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.
232
u/circ-u-la-ted 10d ago
import snek379
u/nicer-dude 10d ago
Does he use snake_case or CamelCase? đ¤
119
u/RefrigeratorThick475 10d ago •
CEO of python checking your python code
60
u/Slow-Television-5303 10d ago
but what about 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 •
John Python, himself !!
13
u/tsoewoe 10d ago
it knows ball
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.Â
5
u/ParanoiaComplex 10d ago edited 10d ago
select_packets is just doing
scrambled_packets[-num_packets:][::-1] if num_packets > 0 else Noneexcept when
len(scrambled_packets) == 1then it doesn't return a list? So I guessresult = packets[-num:][::-1] if num > 1 else (packets[-1] if num == 1 and packets else None)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/MinimumViableSloth 8d ago
checking its own code whether there is a bug
4
u/Panderz_GG 10d ago
I have never touched python in my life. How do you guys do multi line statements?
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/-_-0_0-_0 10d ago
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/CartographerOpen6885 8d ago
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.