Advanced return type (tuple) - how to use? #5532
-
According to the docs TESTed has support for the immutable sequence I've tried (mimicking the full example)
instead of
since the last example would also approve of a |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Yes, this is possible.
It seems these docs are slightly out-of-date: they are missing a required YAML tag. My apologies for that. There are a few equivalent ways of doing this: - expression: RGB((0, 128, 128))
return: !expression "(255, 127, 127)"
- expression: RGB((0, 128, 128))
return: !expression "tuple((255, 127, 127))"
- expression: RGB((0, 128, 128))
return: !tuple [255, 127, 127]
- expression: RGB((0, 128, 128))
return: !tuple
- 255
- 127
- 127 You are correct that your last example will accept both |
Beta Was this translation helpful? Give feedback.
-
It seems this has been resolved, so I'll close the issue. (A small tip: consider posting questions like this in our Discussions in the future, this makes it more discoverable for others as well) |
Beta Was this translation helpful? Give feedback.
Yes, this is possible.
It seems these docs are slightly out-of-date: they are missing a required YAML tag. My apologies for that.
There are a few equivalent ways of doing this:
You are correct that your last example will accept both
list
andtuple
in …