Closed zerothi closed 3 years ago
Thanks a lot :smile: !
Currently, Fypp only allows only for very simple expressions as iteration variable: either a single variable name, or several variable names joined by comma. In order to ensure robustness, Fypp has to extract the individual variable names from the expression and make their assignments indidividually (instead of letting Python to handle the entire expression). Allowing for nested tuples in the iterator variable would make things orders of magnitude more complicated as they are now, and the benefit would be rather low in my opinion. Especially, as you demonstrate, there are not too complicated workarounds.
So, currently I don't see much chance to implement the nested tuples as loop variables in the near future (but code donation is always welcome :wink: ). However, I have updated the documentation (abd25189) to describe the loop variable syntax more in detail.
Great package ;)
Code explains all:
It has to do with the parenthesis is some way.