{"action":"opened","issue":{"url":"https://api.github.com/repos/alecthomas/voluptuous/issues/130","labels_url":"https://api.github.com/repos/alecthomas/voluptuous/issues/130/labels{/name}","comments_url":"https://api.github.com/repos/alecthomas/voluptuous/issues/130/comments","events_url":"https://api.github.com/repos/alecthomas/voluptuous/issues/130/events","html_url":"https://github.com/alecthomas/voluptuous/issues/130","id":106672313,"number":130,"title":"Default for missing key and invalid data","user":{"login":"ncknuna","id":8252564,"avatar_url":"https://avatars.githubusercontent.com/u/8252564?v=3","gravatar_id":"","url":"https://api.github.com/users/ncknuna","html_url":"https://github.com/ncknuna","followers_url":"https://api.github.com/users/ncknuna/followers","following_url":"https://api.github.com/users/ncknuna/following{/other_user}","gists_url":"https://api.github.com/users/ncknuna/gists{/gist_id}","starred_url":"https://api.github.com/users/ncknuna/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ncknuna/subscriptions","organizations_url":"https://api.github.com/users/ncknuna/orgs","repos_url":"https://api.github.com/users/ncknuna/repos","events_url":"https://api.github.com/users/ncknuna/events{/privacy}","received_events_url":"https://api.github.com/users/ncknuna/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-09-16T00:10:09Z","updated_at":"2015-09-16T00:10:09Z","closed_at":null,"body":"Maybe I'm missing something obvious, but there doesn't seem to be a way to say \"use this default value if they key is missing or if validation fails\". Basically, I would like to do the functional equivalent of something like this, in some kind of prettier way:\r\n```\r\n{\r\n    Optional('foobar', default='default'): Any(int, lambda v: 'default'),\r\n}\r\n```\r\n(Where if 'foobar' is missing or is invalid, it should take the value 'default'.)\r\n\r\nThat could either be a different kwarg for Optional, like \"fallback\", or a different Marker entirely. That could look like:\r\n```\r\n{\r\n    Optional('foobar', fallback='default'): int,\r\n}\r\n```"}}