r/ProgrammerHumor • • 10d ago

Meme python

Post image
10k Upvotes

62 comments sorted by

View all comments

Show parent comment

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'.