{"comment":{"url":"https://api.github.com/repos/zack-vii/mdsplus/comments/12695446","html_url":"https://github.com/zack-vii/mdsplus/commit/f4a160c4d2c7e9268ba70a871801f5fd2d65feaf#commitcomment-12695446","id":12695446,"user":{"login":"tfredian","id":7452987,"avatar_url":"https://avatars.githubusercontent.com/u/7452987?v=3","gravatar_id":"","url":"https://api.github.com/users/tfredian","html_url":"https://github.com/tfredian","followers_url":"https://api.github.com/users/tfredian/followers","following_url":"https://api.github.com/users/tfredian/following{/other_user}","gists_url":"https://api.github.com/users/tfredian/gists{/gist_id}","starred_url":"https://api.github.com/users/tfredian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tfredian/subscriptions","organizations_url":"https://api.github.com/users/tfredian/orgs","repos_url":"https://api.github.com/users/tfredian/repos","events_url":"https://api.github.com/users/tfredian/events{/privacy}","received_events_url":"https://api.github.com/users/tfredian/received_events","type":"User","site_admin":false},"position":null,"line":null,"path":"","commit_id":"f4a160c4d2c7e9268ba70a871801f5fd2d65feaf","created_at":"2015-08-13T17:59:12Z","updated_at":"2015-08-13T17:59:12Z","body":"I'm not sure if you understand the point of the original trry/except. On earlier versions of python there is no unicode class so the check if instance(value,unicode) causes an exception. The workaround I had before checked for unicode being in __builtins__ but that failed in more recent versions of  python too. This new change will cause an exception on earlier pythons in the if instance(value,unicode) statement and not fall through to the raise TypeError() statement. It is possible to move the whole try/except block down but I'm not sure why that is necessary."}}