{"action":"created","issue":{"url":"https://api.github.com/repos/alecthomas/voluptuous/issues/381","repository_url":"https://api.github.com/repos/alecthomas/voluptuous","labels_url":"https://api.github.com/repos/alecthomas/voluptuous/issues/381/labels{/name}","comments_url":"https://api.github.com/repos/alecthomas/voluptuous/issues/381/comments","events_url":"https://api.github.com/repos/alecthomas/voluptuous/issues/381/events","html_url":"https://github.com/alecthomas/voluptuous/issues/381","id":408548367,"node_id":"MDU6SXNzdWU0MDg1NDgzNjc=","number":381,"title":"Inclusive should support default values","user":{"login":"nickovs","id":4205868,"node_id":"MDQ6VXNlcjQyMDU4Njg=","avatar_url":"https://avatars3.githubusercontent.com/u/4205868?v=4","gravatar_id":"","url":"https://api.github.com/users/nickovs","html_url":"https://github.com/nickovs","followers_url":"https://api.github.com/users/nickovs/followers","following_url":"https://api.github.com/users/nickovs/following{/other_user}","gists_url":"https://api.github.com/users/nickovs/gists{/gist_id}","starred_url":"https://api.github.com/users/nickovs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nickovs/subscriptions","organizations_url":"https://api.github.com/users/nickovs/orgs","repos_url":"https://api.github.com/users/nickovs/repos","events_url":"https://api.github.com/users/nickovs/events{/privacy}","received_events_url":"https://api.github.com/users/nickovs/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2019-02-10T15:52:01Z","updated_at":"2019-02-12T17:16:06Z","closed_at":null,"author_association":"NONE","body":"The `Inclusive` schema builder does not support default values even though it inherits from `Optional`, which does support them. It would be valuable if defaults were supported for situations such as this:\r\n```\r\ndimensions = Schema({\r\n    Inclusive(\"width\", \"dims\", default=1024): Coerce(int),\r\n    Inclusive(\"height\", \"dims\", default=576): Coerce(int),\r\n}\r\n```\r\nIn general, when using `Inclusive` to enforce \"all or nothing\", having default values for the \"nothing\" case would be very helpful.\r\n"},"comment":{"url":"https://api.github.com/repos/alecthomas/voluptuous/issues/comments/462848989","html_url":"https://github.com/alecthomas/voluptuous/issues/381#issuecomment-462848989","issue_url":"https://api.github.com/repos/alecthomas/voluptuous/issues/381","id":462848989,"node_id":"MDEyOklzc3VlQ29tbWVudDQ2Mjg0ODk4OQ==","user":{"login":"sfelf","id":1295690,"node_id":"MDQ6VXNlcjEyOTU2OTA=","avatar_url":"https://avatars3.githubusercontent.com/u/1295690?v=4","gravatar_id":"","url":"https://api.github.com/users/sfelf","html_url":"https://github.com/sfelf","followers_url":"https://api.github.com/users/sfelf/followers","following_url":"https://api.github.com/users/sfelf/following{/other_user}","gists_url":"https://api.github.com/users/sfelf/gists{/gist_id}","starred_url":"https://api.github.com/users/sfelf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sfelf/subscriptions","organizations_url":"https://api.github.com/users/sfelf/orgs","repos_url":"https://api.github.com/users/sfelf/repos","events_url":"https://api.github.com/users/sfelf/events{/privacy}","received_events_url":"https://api.github.com/users/sfelf/received_events","type":"User","site_admin":false},"created_at":"2019-02-12T17:16:06Z","updated_at":"2019-02-12T17:16:06Z","author_association":"NONE","body":"Sorry dumb question here... how is this different from:\r\n\r\n```\r\ndimensions = Schema({\r\n    Optional(\"width\", default=1024): Coerce(int),\r\n    Optional(\"height\", default=576): Coerce(int),\r\n}\r\n```"}}
{"actor":{"display_login":"sfelf"}}