{"action":"created","issue":{"url":"https://api.github.com/repos/uchicago-cs/deepdish/issues/13","labels_url":"https://api.github.com/repos/uchicago-cs/deepdish/issues/13/labels{/name}","comments_url":"https://api.github.com/repos/uchicago-cs/deepdish/issues/13/comments","events_url":"https://api.github.com/repos/uchicago-cs/deepdish/issues/13/events","html_url":"https://github.com/uchicago-cs/deepdish/pull/13","id":128909351,"number":13,"title":"Allow all six.string_types in save and load","user":{"login":"craffel","id":417568,"avatar_url":"https://avatars.githubusercontent.com/u/417568?v=3","gravatar_id":"","url":"https://api.github.com/users/craffel","html_url":"https://github.com/craffel","followers_url":"https://api.github.com/users/craffel/followers","following_url":"https://api.github.com/users/craffel/following{/other_user}","gists_url":"https://api.github.com/users/craffel/gists{/gist_id}","starred_url":"https://api.github.com/users/craffel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/craffel/subscriptions","organizations_url":"https://api.github.com/users/craffel/orgs","repos_url":"https://api.github.com/users/craffel/repos","events_url":"https://api.github.com/users/craffel/events{/privacy}","received_events_url":"https://api.github.com/users/craffel/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2016-01-26T18:51:34Z","updated_at":"2016-01-26T20:25:09Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/uchicago-cs/deepdish/pulls/13","html_url":"https://github.com/uchicago-cs/deepdish/pull/13","diff_url":"https://github.com/uchicago-cs/deepdish/pull/13.diff","patch_url":"https://github.com/uchicago-cs/deepdish/pull/13.patch"},"body":"Currently, if a unicode string was passed to `deepdish.io.load` or `save`, it would fail because `isinstance(u'file.h5', str) = False`.  This PR allows for all `six.string_types` to be passed.\r\n\r\nMore generally, I'd suggest something like this, assuming it covers your intended use-cases:\r\n```Python\r\nif isinstance(path, file):\r\n    path = path.name\r\nelif not isinstance(path, six.string_types):\r\n    raise ValueError('path type {} not supported.'.format(type(path))\r\n```"},"comment":{"url":"https://api.github.com/repos/uchicago-cs/deepdish/issues/comments/175210014","html_url":"https://github.com/uchicago-cs/deepdish/pull/13#issuecomment-175210014","issue_url":"https://api.github.com/repos/uchicago-cs/deepdish/issues/13","id":175210014,"user":{"login":"gustavla","id":902935,"avatar_url":"https://avatars.githubusercontent.com/u/902935?v=3","gravatar_id":"","url":"https://api.github.com/users/gustavla","html_url":"https://github.com/gustavla","followers_url":"https://api.github.com/users/gustavla/followers","following_url":"https://api.github.com/users/gustavla/following{/other_user}","gists_url":"https://api.github.com/users/gustavla/gists{/gist_id}","starred_url":"https://api.github.com/users/gustavla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gustavla/subscriptions","organizations_url":"https://api.github.com/users/gustavla/orgs","repos_url":"https://api.github.com/users/gustavla/repos","events_url":"https://api.github.com/users/gustavla/events{/privacy}","received_events_url":"https://api.github.com/users/gustavla/received_events","type":"User","site_admin":false},"created_at":"2016-01-26T20:25:09Z","updated_at":"2016-01-26T20:25:09Z","body":"Yeah, we can probably just remove it altogether right away without no one ever noticing. So, the final solution is to have no if statement altogether. There is a unit test in `test_io.py` that will need to be removed for the tests to pass."}}