cavcalc.output.MultiOutput.get#
- MultiOutput.get(key: Union[str, ParameterType, ParameterCategory], default=None)#
Retrieve a target result, or a collection of these, using a suitable key.
If
keyis a string or aParameterTypethen the corresponding target parameter will be returned if it exists,defaultis returned otherwise.Alternatively,
keycan be aParameterCategory. In this case all the target parameters belonging to this category will be returned, ordefaultif no targets of this category are present in the output.- Parameters:
- keystr |
ParameterType|ParameterCategory The key of the target(s) to retrieve. See above for options.
- defaultAny | NoneType, optional
The default value to return if no target(s) corresponding to
keycould be found.
- keystr |
- Returns:
- target
TargetParameter| tuple[TargetParameter] | Any The target, or tuple of targets if
keywas aParameterCategory, ordefaultif no target(s) could be obtained from the givenkey.
- target