alecthomas/voluptuous — pull request #47 by Kleptine (2013-10-06 17:01:38+00:00)
Title: Optional keys can have defaults.  Adds unittest to Optional

Added functionality for Optional schema nodes to be provided a default to make things nicer when defining required=True schemas. Partially wrote it for fun and profit, but figured I would contribute the change as well.

I had to separate the required and default keys in the schema compilation function, but other than that, not much is changed.

Unit tests pass and seems to work well.