def __get__(self, inst, cls=None): if inst is None: return getObjectSpecification(cls) else: provided = providedBy(inst._IndexableObjectWrapper__ob) cls = type(inst) return ObjectSpecification(provided, cls)
def __get__(self, inst, cls=None): if inst is None: return getObjectSpecification(cls) else: provided = providedBy(getProxiedObject(inst)) # Use type rather than __class__ because inst is a proxy and # will return the proxied object's class. cls = type(inst) return ObjectSpecification(provided, cls)
def __get__(self, inst, cls=None): if inst is None: # pragma: no cover (Not sure how we can get here) return getObjectSpecification(cls) provided = providedBy(getProxiedObject(inst)) # Use type rather than __class__ because inst is a proxy and # will return the proxied object's class. cls = type(inst) return ObjectSpecification(provided, cls)