def getObjectSpecification(ob):

    provides = getattr(ob, '__provides__', None)
    if provides is not None:
        if isinstance(provides, SpecificationBase):
            return provides

    try:
        cls = ob.__class__
    except __HOLE__:
        # We can't get the class, so just consider provides
        return _empty

    return implementedBy(cls)
dataset/ETHPy150Open kuri65536/python-for-android/python-modules/zope/zope/interface/declarations.py/getObjectSpecification