Package mrv :: Module util :: Class WeakInstFunction
[hide private]
[frames] | no frames]

Class WeakInstFunction

source code

object --+
         |
        WeakInstFunction

Create a proper weak instance to an instance function by weakly binding the instance, not the bound function object. When called, the weakreferenced instance pointer will be retrieved, if possible, to finally make the call. If it could not be retrieved, the call will do nothing.
Instance Methods [hide private]
 
__call__(self, *args, **kwargs) source code
 
__eq__(self, other) source code
 
__hash__(self)
hash(x)
source code
 
__init__(self, instancefunction)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code

Inherited from object: __delattr__, __format__, __getattribute__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]
  _clsfunc
  _weakinst

Inherited from object: __class__

Method Details [hide private]

__call__(self, *args, **kwargs)
(Call operator)

source code 
Raises:
  • LookupError - if the instance referred to by the instance method does not exist anymore

__hash__(self)
(Hashing function)

source code 

hash(x)

Overrides: object.__hash__
(inherited documentation)

__init__(self, instancefunction)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)