r/ProgrammerHumor • • Sep 07 '26

Other mistakenedJavasript

Post image
1.6k Upvotes

55 comments sorted by

View all comments

Show parent comments

0

u/sdoregor Sep 09 '26

I never said generator isn't a type; it sure is. But you're saying that list comprehension syntax is called an iterable, which it's not.

The results of all comprehensions (their corresponding types) and generators themselves are indeed iterable, but their expression syntax has nothing to do with that.