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
# ==============
Modules deep inside an egg can still be tested for existence
dataset/ETHPy150Open PyTables/PyTables/tables/atom.py/_cmp_dispatcher--crossover with--dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.5/tests/regressiontests/utils/module_loading.py/EggLoader.test_deep_loader