Package elisa :: Package core :: Package utils :: Module bindable :: Class Bindable

Class Bindable

source code


A Bindable instance can have its attributes replicated into ones of other objects. All modifications to the attributes are directly reflected.

Instance Methods
 
__init__(self)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
bind(self, attribute, destination_object, destination_attribute)
Bind a local attribute to destination_attribute of destination_object.
source code
 
unbind(self, attribute, destination_object, destination_attribute)
Remove the binding of attribute to destination_attribute of destination_object.
source code
 
unbind_object(self, destination_object)
Remove all the bindings you have for a certain destination_object.
source code
 
__setattr__(self, attribute, new_value)
x.__setattr__('name', value) <==> x.name = value
source code
 
__delattr__(self, attribute)
x.__delattr__('name') <==> del x.name
source code

Inherited from extern.log.log.Loggable: debug, doLog, error, info, log, logFunction, logObjectName, warning, warningFailure

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

Class Variables

Inherited from extern.log.log.Loggable: logCategory

Properties

Inherited from object: __class__

Method Details

__init__(self)
(Constructor)

source code 

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

Overrides: object.__init__
(inherited documentation)

bind(self, attribute, destination_object, destination_attribute)

source code 

Bind a local attribute to destination_attribute of destination_object.

Parameters:
  • attribute (str) - local attribute to bind
Raises:
  • NotBindable - when you try to bind a private attribute (beginning with an underscore)

unbind(self, attribute, destination_object, destination_attribute)

source code 

Remove the binding of attribute to destination_attribute of destination_object.

If you want to unbind the whole destination_object you should use the unbind_object method instead.

Parameters:
  • attribute (str) - local attribute to unbind
Raises:
  • NotBoundError - when you try to unbind something that is not bound

__setattr__(self, attribute, new_value)

source code 

x.__setattr__('name', value) <==> x.name = value

Overrides: object.__setattr__
(inherited documentation)

__delattr__(self, attribute)

source code 

x.__delattr__('name') <==> del x.name

Overrides: object.__delattr__
(inherited documentation)