Home | Trees | Indices | Help |
---|
|
object --+ | basevalidator.BaseValidator --+ | Synonyms
Map values to other values.
Note that this does not explicitly throw errors. If a value is un-mapped, it is simply returned.
|
|||
|
|||
|
|||
Inherited from Inherited from |
|
|||
Inherited from |
|
For example: >>> d = {'foo': 1, 'bar': 2} >>> v = Synonyms(d) >>> v('foo') 1 >>> v('quux') 'quux'
|
Transform a value to the desired form. This is the workhorse method that is called by convert to transform passed values. As such, errors are signalled by throwing a meaningful exception. This is one of the obvious and easiest places to customize behaviour by overriding in a subclass.
|
Home | Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Fri Jul 22 15:13:46 2011 | http://epydoc.sourceforge.net |