def getEntries(the_class, mode):
        """ get all entries by given mode (function or method) but the
            members of the concrete class only; not from its base """

        classes = {}
        for concrete_class in reversed(inspect.getmro(the_class)):
            classes[concrete_class] = {}
            for name, definition in dict(inspect.getmembers(concrete_class, mode)).items():
                object_name = name
                is_base_method_only = False

                for known_class in classes:
                    if not object_name in classes[known_class]:
                        continue

                    if classes[known_class][object_name] == definition:
                        is_base_method_only = True
                        break

                if not is_base_method_only:
                    classes[concrete_class][object_name] = definition

        return list(classes[the_class].keys())
 get all entries by given mode (function or method) but the
            members of the concrete class only; not from its base 
recipes/Python/578793_More_strict_unittests_using/recipe-578793.py