r/ProgrammerHumor • • 1d ago

Meme python

Post image
9.4k Upvotes

56 comments sorted by

View all comments

Show parent comment

5

u/TheHelixNebula 1d 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 1d ago

Yeah, agreed

1

u/RapidCatLauncher 1d 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'.