def _must_skip(spec, entry, skipfirst):
    if not isinstance(spec, ClassTypes):
        if entry in getattr(spec, '__dict__', {}):
            # instance attribute - shouldn't skip
            return False
        # can't use type because of old style classes
        spec = spec.__class__
    if not hasattr(spec, '__mro__'):
        # old style class: can't have descriptors anyway
        return skipfirst

    for klass in spec.__mro__:
        result = klass.__dict__.get(entry, DEFAULT)
        if result is DEFAULT:
            continue
        if isinstance(result, (staticmethod, classmethod)):
            return False
        return skipfirst

    # shouldn't get here unless attribute dynamically provided
    return skipfirst
dataset/ETHPy150Open sibson/vncdotool/tests/unit/mock.py/_must_skip/original