def _cmp_dispatcher(other_method_name):

    def dispatched_cmp(self, other):
        try:
            other_method = getattr(other, other_method_name)
        except AttributeError:
            return False
        return other_method(self)
    return dispatched_cmp


# Helper classes
# ==============
Dispatch comparisons to a method of the *other* object.
dataset/ETHPy150Open PyTables/PyTables/tables/atom.py/_cmp_dispatcher