| Class: Delegate | ./src/peak/binding/components.py | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
Delegate attribute to the same attribute of another objectUsage:
class PasswordFile(binding.Component):
shadow = binding.Obtain('config:etc.shadow/')
checkPwd = changePwd = binding.Delegate('shadow')
The above is equivalent to this longer version:
class PasswordFile(binding.Component):
shadow = binding.Obtain('config:etc.shadow/')
checkPwd = binding.Obtain('shadow/checkPwd')
changePwd = binding.Obtain('shadow/changePwd')
Because
|