Beispiel #1
0
 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)
Beispiel #2
0
    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)
Beispiel #3
0
    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)