We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Values(...)
1 parent f713a3f commit dd5dd18Copy full SHA for dd5dd18
unpythonic/syntax/autocurry.py
@@ -85,7 +85,10 @@ def transform(self, tree):
85
return tree
86
87
hascurry = self.state.hascurry
88
- if type(tree) is Call:
+ # Curry all calls; except as a small optimization, skip `Values(...)`,
89
+ # which accepts any args and kwargs, so currying it does not make sense.
90
+ # (It represents multiple-return-values in `unpythonic`.)
91
+ if type(tree) is Call and not isx(tree.func, "Values"):
92
if has_curry(tree): # detect decorated lambda with manual curry
93
# the lambda inside the curry(...) is the next Lambda node we will descend into.
94
hascurry = True
0 commit comments