def Override(classes):
    """ Override(classes) -> decorator

    Decorator which emulates the same behaviour as the
    Overrides annotation in Java >= 1.5
    """
    def wrapped(func):
        try:
            real_classes = tuple(( i for i in classes ))
        except TypeError:
            real_classes = ( classes, )

        found = False
        for i in real_classes:
            if hasattr(i, func.__name__):
                found = True
                break
        if not found:
            raise TypeError((func.__name__, real_classes) % "Method %s is not present in classes: %s")
        else:
            return func
    return wrapped
dataset/ETHPy150Open weblabdeusto/weblabdeusto/server/src/voodoo/override.py/Override/swapped operands of `%`