https://pulumi.com logo
Title
b

broad-finland-69602

11/25/2019, 4:13 PM
Does anybody know if there is a way to have the equivalent of
.apply(([server, db])
from TypeScript in Python, instead of
.apply(lambda args:…)
or chaining lambdas?
w

white-balloon-205

11/25/2019, 4:30 PM
I believe Python used to support array restructuring in parameter lists, but removed it. See for example https://stackoverflow.com/questions/55940225/array-destructuring-in-python. You can still have the first line of your lambda do a restructuring assignment in order to get “good” names for the array elements.
b

broad-finland-69602

11/26/2019, 9:22 AM
I see. So which is the more "pulumic" way to handle that? chained lambdas or positional arguments from a list? we are thinking about how to structure projects and setting some standards for a team and it would be good to have "one way" that people can expect.