WeakMethod

class Cauldron.utils.callbacks.WeakMethod(meth, callback=None)[source] [edit on github]

Bases: object

A weak reference to a method.

Attributes Summary

callback
func The de-referenced function
instance The bound instance for bound methods.
method
valid Is this reference still valid?

Methods Summary

__call__(*args, **kwargs) Call the underlying method.
bound(instance) Return the bound method.
check() Check references here.
copy()
get() Get the bound method.

Attributes Documentation

callback = None
func

The de-referenced function

instance

The bound instance for bound methods.

method = False
valid

Is this reference still valid?

Methods Documentation

__call__(*args, **kwargs)[source] [edit on github]

Call the underlying method.

bound(instance)[source] [edit on github]

Return the bound method.

check()[source] [edit on github]

Check references here.

copy()[source] [edit on github]
get()[source] [edit on github]

Get the bound method.