{"comment":{"url":"https://api.github.com/repos/callidus/PyKMIP/comments/10644463","html_url":"https://github.com/callidus/PyKMIP/commit/69dfbaa6c28211a14ddc0c5b5d27f42994733bdc#commitcomment-10644463","id":10644463,"user":{"login":"PeterHamilton","id":8269688,"avatar_url":"https://avatars.githubusercontent.com/u/8269688?v=3","gravatar_id":"","url":"https://api.github.com/users/PeterHamilton","html_url":"https://github.com/PeterHamilton","followers_url":"https://api.github.com/users/PeterHamilton/followers","following_url":"https://api.github.com/users/PeterHamilton/following{/other_user}","gists_url":"https://api.github.com/users/PeterHamilton/gists{/gist_id}","starred_url":"https://api.github.com/users/PeterHamilton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PeterHamilton/subscriptions","organizations_url":"https://api.github.com/users/PeterHamilton/orgs","repos_url":"https://api.github.com/users/PeterHamilton/repos","events_url":"https://api.github.com/users/PeterHamilton/events{/privacy}","received_events_url":"https://api.github.com/users/PeterHamilton/received_events","type":"User","site_admin":false},"position":59,"line":109,"path":"kmip/core/factories/secrets.py","commit_id":"69dfbaa6c28211a14ddc0c5b5d27f42994733bdc","created_at":"2015-04-09T12:26:03Z","updated_at":"2015-04-09T12:26:03Z","body":"I had a couple of things in mind. My original line of thought was to allow users to create default `SecretData` objects by also passing in empty dicts. However, it makes more sense to just amend the above conditional, rather than tweak things here.\r\n\r\nI generally prefer to use `get(...)` to access dict key values. In this case you're right, `SecretDataType` will ultimately convert `None` to 0; however this is due to how the primitives class hierarchy handles default values, not the `Enum` system. This wouldn't be an issue if default values were handled better for the different enumerations, but that's a different problem. For now, indexing the key is fine."}}