{"action":"created","issue":{"url":"https://api.github.com/repos/zeromq/zproject/issues/530","repository_url":"https://api.github.com/repos/zeromq/zproject","labels_url":"https://api.github.com/repos/zeromq/zproject/issues/530/labels{/name}","comments_url":"https://api.github.com/repos/zeromq/zproject/issues/530/comments","events_url":"https://api.github.com/repos/zeromq/zproject/issues/530/events","html_url":"https://github.com/zeromq/zproject/issues/530","id":131412655,"number":530,"title":"Dealing with integer status codes is un-pythonic","user":{"login":"asokoloski","id":202731,"avatar_url":"https://avatars.githubusercontent.com/u/202731?v=3","gravatar_id":"","url":"https://api.github.com/users/asokoloski","html_url":"https://github.com/asokoloski","followers_url":"https://api.github.com/users/asokoloski/followers","following_url":"https://api.github.com/users/asokoloski/following{/other_user}","gists_url":"https://api.github.com/users/asokoloski/gists{/gist_id}","starred_url":"https://api.github.com/users/asokoloski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asokoloski/subscriptions","organizations_url":"https://api.github.com/users/asokoloski/orgs","repos_url":"https://api.github.com/users/asokoloski/repos","events_url":"https://api.github.com/users/asokoloski/events{/privacy}","received_events_url":"https://api.github.com/users/asokoloski/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-02-04T17:07:24Z","updated_at":"2016-02-04T17:25:42Z","closed_at":null,"body":"I'd like to change the api model schema a bit in order to allow generation of bindings that take the integer status code (0=success, otherwise failure) returned by a method and raise a python exception instead.\r\n\r\nSomething like one of these:\r\n\r\n    <return type=\"status_code\" />\r\n    <return type=\"integer\" is_status=\"1\" />\r\n    <return type=\"integer\" kind=\"status\">\r\n\r\nor\r\n\r\n    <method ... returns_status = \"1\">...</method>\r\n\r\nAt the risk of inviting bikeshedding, any reason to prefer one over the others?  If not I'll probably go with the second one."},"comment":{"url":"https://api.github.com/repos/zeromq/zproject/issues/comments/179956305","html_url":"https://github.com/zeromq/zproject/issues/530#issuecomment-179956305","issue_url":"https://api.github.com/repos/zeromq/zproject/issues/530","id":179956305,"user":{"login":"asokoloski","id":202731,"avatar_url":"https://avatars.githubusercontent.com/u/202731?v=3","gravatar_id":"","url":"https://api.github.com/users/asokoloski","html_url":"https://github.com/asokoloski","followers_url":"https://api.github.com/users/asokoloski/followers","following_url":"https://api.github.com/users/asokoloski/following{/other_user}","gists_url":"https://api.github.com/users/asokoloski/gists{/gist_id}","starred_url":"https://api.github.com/users/asokoloski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asokoloski/subscriptions","organizations_url":"https://api.github.com/users/asokoloski/orgs","repos_url":"https://api.github.com/users/asokoloski/repos","events_url":"https://api.github.com/users/asokoloski/events{/privacy}","received_events_url":"https://api.github.com/users/asokoloski/received_events","type":"User","site_admin":false},"created_at":"2016-02-04T17:25:42Z","updated_at":"2016-02-04T17:25:42Z","body":"Actually, I think the first option, <return type=\"status_code\" />, is a bit cleaner and doesn't require as many changes as I predicted."}}