this post was submitted on 14 Nov 2023
814 points (94.7% liked)

Programmer Humor

32588 readers
1702 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] hypertown -1 points 1 year ago (5 children)

Well, that depends on definition. But the joke is why on earth would you want to write types on your shopping list? Like this:

  • tomatos (vegetable)
  • apples (fruit)

Etc.

[–] [email protected] 7 points 1 year ago

To be conformant with PEP-8.

[–] [email protected] 7 points 1 year ago

Why not? If a shop is having a sale on fruits only then I would like to sort out all the fruits quickly.

[–] [email protected] 7 points 1 year ago

Well, I can't think of an English example from the top of my head, but in German the words for Pear and (light) bulb are the same. So there are some exotic use cases.

[–] [email protected] 2 points 1 year ago* (last edited 1 year ago)

So that the mindless automaton delivering your groceries doesn't unexpectedly give you tomatoes for your sundae, in a future expansion to dish-based orders.

I've yet to create a type error that didn't correspond to me thinking about something wrong.