pyviability.helper module¶
helper.py provides small utilities that don’t really fit enywhere else but are needed in the package.
-
pyviability.helper.
get_ordered_parameters
(func, parameter_dict)[source]¶ Convert a dictionary of parameters for a function into an ordered tuple.
Parameters: - func (callable) – function whose argument order should be determined
- parameter_dict (dict) –
- dictionary with
- keys : string representation of the positional arguments of func
values : corresponding values that should be sorted by the order the keys appear as arguments for func
Returns: tuple of the ordered parameters for func
Return type: tuple