I don't mean to be pedantic but IIRC Python's comprehensions actually came from the SETL language.
Obviously it's ultimately the same thing either way, but that's the lineage (SETL -> ABC -> Python).
Obviously it's ultimately the same thing either way, but that's the lineage (SETL -> ABC -> Python).
https://docs.python.org/3/howto/functional.html#generator-ex... claims Python borrowed them from Haskell, but the ABC link seems more likely.
As I recall, Python did get them from Haskell, which in turn got them from Miranda, which got them from KRC. Before that it gets fuzzy, but it's likely that SETL was eventually at the root of it.