Home | Trees | Indices | Help |
|
---|
|
object --+ | property --+ | validatedproperty
Property decorator with predefined getter/setter and value checking or casting in the setter. The provided function will be the validator and must take and return a value.
If the property is named foo
, a private field named
_foo
will be used to store the value.
Example:
>>> @validatedproperty >>> def a(v): >>> v = int(v) >>> if v < 0: >>> raise ValueError(v) >>> return v
Instance Methods | |||
value |
|
||
property attribute |
|
||
|
|||
Inherited from Inherited from |
Properties | |
Inherited from Inherited from |
Method Details |
|
x.__init__(...) initializes x; see help(type(x)) for signature
|
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Tue Jul 4 20:19:06 2017 | http://epydoc.sourceforge.net |