Package suds :: Module properties :: Class Definition
[hide private]
[frames] | no frames]

Class Definition

source code

Property definition.

Instance Methods [hide private]
 
__init__(self, name, classes, default, linker=AutoLinker()) source code
any
nvl(self, value=None)
Convert the value into the default when None.
source code
 
validate(self, value)
Validate the value is of the correct class.
source code
 
__repr__(self) source code
 
__str__(self) source code
Instance Variables [hide private]
tuple classes
The (class) list of permitted values
  default
The default value.
str name
The property name.
  type
any
Method Details [hide private]

__init__(self, name, classes, default, linker=AutoLinker())
(Constructor)

source code 
Parameters:
  • name (str) - The property name.
  • classes (tuple) - The (class) list of permitted values
  • default (any) - The default value.

nvl(self, value=None)

source code 

Convert the value into the default when None.

Parameters:
  • value (any) - The proposed value.
Returns: any
The default when value is None, else value.

validate(self, value)

source code 

Validate the value is of the correct class.

Parameters:
  • value (any) - The value to validate.
Raises:
  • AttributeError - When value is invalid.