can there be tuple for-comprehension too? #2718
-
conclusion
motivating use cases
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
|
I'm guessing because there is no tuple generator in python. Are you after something equivalent to |
Beta Was this translation helpful? Give feedback.
-
|
I was curious, once I thought about it, why there are no tuple comprehensions. A core Python developer discusses it here: https://discuss.python.org/t/why-no-tuple-comprehension/2820 |
Beta Was this translation helpful? Give feedback.
No, each comprehension type is its own AST node type, and there is no API to add and implement your own node types.