class documentation

class _ProxyLookup: (source)

Known subclasses: werkzeug.local._ProxyIOp

View In Hierarchy

Descriptor that handles proxied attribute lookup for :class:`LocalProxy`. :param f: The built-in function this attribute is accessed through. Instead of looking up the special method, the function call is redone on the object. :param fallback: Return this function if the proxy is unbound instead of raising a :exc:`RuntimeError`. :param is_attr: This proxied name is an attribute, not a function. Call the fallback immediately to get the value. :param class_value: Value to return when accessed from the ``LocalProxy`` class directly. Used for ``__doc__`` so building docs still works.

Method __call__ Support calling unbound methods from the class. For example, this happens with ``copy.copy``, which does ``type(x).__copy__(x)``. ``type(x)`` can't be proxied, so it returns the proxy type and descriptor.
Method __get__ Undocumented
Method __init__ Undocumented
Method __repr__ Undocumented
Method __set_name__ Undocumented
Class Variable __slots__ Undocumented
Instance Variable bind_f Undocumented
Instance Variable class_value Undocumented
Instance Variable fallback Undocumented
Instance Variable is_attr Undocumented
Instance Variable name Undocumented
def __call__(self, instance: LocalProxy, *args: t.Any, **kwargs: t.Any) -> t.Any: (source)

Support calling unbound methods from the class. For example, this happens with ``copy.copy``, which does ``type(x).__copy__(x)``. ``type(x)`` can't be proxied, so it returns the proxy type and descriptor.

def __get__(self, instance: LocalProxy, owner: t.Optional[type] = None) -> t.Any: (source)

Undocumented

def __init__(self, f: t.Optional[t.Callable] = None, fallback: t.Optional[t.Callable] = None, class_value: t.Optional[t.Any] = None, is_attr: bool = False): (source)

Undocumented

def __repr__(self) -> str: (source)

Undocumented

def __set_name__(self, owner: LocalProxy, name: str): (source)

Undocumented

__slots__: tuple[str, ...] = (source)

Undocumented

Undocumented

class_value = (source)

Undocumented

fallback = (source)

Undocumented

Undocumented

Undocumented