Pylons/colander — pull request #61 by stefanofontanelli (2012-08-13 12:17:07+00:00)
Title: Add support for callables in 'default'/'missing' serialization/deserialization

This commit add support in SchemaNode serialization/deserialization to allow the following code:

import colander
import datetime

class Log(colander.MappingSchema):
service_name = colander.SchemaNode(colander.String())
action = colander.SchemaNode(colander.String())
timestamp = colander.SchemaNode(colander.DateTime(),
default=datetime.datetime.now
missing=datetime.datetime.now)

Added tests to check the new feature.
Update docs inside SchemaNode.__init__ to explain the new feature.