Pylons/colander — pull request #121 by mrijken (2013-07-30 20:31:35+00:00)
Title: Add NoneType for (de)serializing None options for other schematypes

In my apps, I have Colander schemas with optional fields for which None is needed to store the absence of a value in ie a SQL database. For that, the colander.null value can not be used. So I made a supertype which can embrace every other schematype to add the posibility to add None as value.

Example:

typ = NoneType(Boolean())
serialize True --> 'true'
serialize None --> ''
deserialize '' --> None
deserlialize 'true' --> True