Source code for rook.utils.ops.helpers

"""Helper utilities for operation plumbing."""

import collections


[docs] def wrap_sequence(obj): """Return a list for scalar inputs and preserve sequences.""" if isinstance(obj, str): obj = [obj] return obj
[docs] def ordered_dict(): """Return an OrderedDict instance.""" return collections.OrderedDict()