{"action":"created","comment":{"url":"https://api.github.com/repos/convexopt/gpkit/pulls/comments/29306935","id":29306935,"diff_hunk":"@@ -45,14 +47,14 @@ def __init__(self, exps=None, cs=1, varlocsandkeys=None,\n             cs = exps\n             exps = {}\n         if (isinstance(cs, Numbers)\n-           and isinstance(exps, Strings + (VarKey, NoneType, dict))):\n+           and (exps is None or isinstance(exps, Strings + (VarKey, dict)))):\n             # building a Monomial\n             if isinstance(exps, VarKey):\n                 exp = {exps: 1}\n                 units = exps.descr[\"units\"] if \"units\" in exps.descr else None\n             elif exps is None or isinstance(exps, Strings):\n                 exp = {VarKey(exps, **descr): 1}\n-                descr = exp.keys()[0].descr\n+                descr = list(exp)[0].descr","path":"gpkit/nomials.py","position":29,"original_position":29,"commit_id":"58939c9cd63d3a02e93fd1adc6f490b595d5e558","original_commit_id":"58939c9cd63d3a02e93fd1adc6f490b595d5e558","user":{"login":"whoburg","id":6042395,"avatar_url":"https://avatars.githubusercontent.com/u/6042395?v=3","gravatar_id":"","url":"https://api.github.com/users/whoburg","html_url":"https://github.com/whoburg","followers_url":"https://api.github.com/users/whoburg/followers","following_url":"https://api.github.com/users/whoburg/following{/other_user}","gists_url":"https://api.github.com/users/whoburg/gists{/gist_id}","starred_url":"https://api.github.com/users/whoburg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/whoburg/subscriptions","organizations_url":"https://api.github.com/users/whoburg/orgs","repos_url":"https://api.github.com/users/whoburg/repos","events_url":"https://api.github.com/users/whoburg/events{/privacy}","received_events_url":"https://api.github.com/users/whoburg/received_events","type":"User","site_admin":false},"body":"creating a list here seems potentially expensive / unnecessary?","created_at":"2015-04-29T02:41:10Z","updated_at":"2015-04-29T02:41:10Z","html_url":"https://github.com/convexopt/gpkit/pull/235#discussion_r29306935","pull_request_url":"https://api.github.com/repos/convexopt/gpkit/pulls/235","_links":{"self":{"href":"https://api.github.com/repos/convexopt/gpkit/pulls/comments/29306935"},"html":{"href":"https://github.com/convexopt/gpkit/pull/235#discussion_r29306935"},"pull_request":{"href":"https://api.github.com/repos/convexopt/gpkit/pulls/235"}}},"pull_request":{"url":"https://api.github.com/repos/convexopt/gpkit/pulls/235","id":34299539,"html_url":"https://github.com/convexopt/gpkit/pull/235","diff_url":"https://github.com/convexopt/gpkit/pull/235.diff","patch_url":"https://github.com/convexopt/gpkit/pull/235.patch","issue_url":"https://api.github.com/repos/convexopt/gpkit/issues/235","number":235,"state":"open","locked":false,"title":"Python 3 compatibility + a bit of pylint","user":{"login":"bqpd","id":1482776,"avatar_url":"https://avatars.githubusercontent.com/u/1482776?v=3","gravatar_id":"","url":"https://api.github.com/users/bqpd","html_url":"https://github.com/bqpd","followers_url":"https://api.github.com/users/bqpd/followers","following_url":"https://api.github.com/users/bqpd/following{/other_user}","gists_url":"https://api.github.com/users/bqpd/gists{/gist_id}","starred_url":"https://api.github.com/users/bqpd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bqpd/subscriptions","organizations_url":"https://api.github.com/users/bqpd/orgs","repos_url":"https://api.github.com/users/bqpd/repos","events_url":"https://api.github.com/users/bqpd/events{/privacy}","received_events_url":"https://api.github.com/users/bqpd/received_events","type":"User","site_admin":false},"body":"Having a separate python3 branch was going to / got messy.\r\n\r\nThis PR has the necessary python3 changes (mostly cosmetic: maybe a few more unneeded objects created in some py2 operations) and pylint changes (totally cosmetic: caps in testing constants).\r\n\r\nIn this branch the unit test _sometimes_ all succeed; python 3 has randomized dictionary ordering, which screws with our tests quite a bit (though it doesn't hurt our actual functionality). The only solver curently supported in python3 is `mosek_cli`.\r\n\r\nDon't trust github's diffs; pull this and do `git diff master`\r\n\r\nSupersedes #206.","created_at":"2015-04-28T18:58:49Z","updated_at":"2015-04-29T02:41:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"218e0b1e0ecaac827a9f12eb84bf875b85141ea4","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/convexopt/gpkit/pulls/235/commits","review_comments_url":"https://api.github.com/repos/convexopt/gpkit/pulls/235/comments","review_comment_url":"https://api.github.com/repos/convexopt/gpkit/pulls/comments{/number}","comments_url":"https://api.github.com/repos/convexopt/gpkit/issues/235/comments","statuses_url":"https://api.github.com/repos/convexopt/gpkit/statuses/58939c9cd63d3a02e93fd1adc6f490b595d5e558","head":{"label":"convexopt:py3lint","ref":"py3lint","sha":"58939c9cd63d3a02e93fd1adc6f490b595d5e558","user":{"login":"convexopt","id":7919400,"avatar_url":"https://avatars.githubusercontent.com/u/7919400?v=3","gravatar_id":"","url":"https://api.github.com/users/convexopt","html_url":"https://github.com/convexopt","followers_url":"https://api.github.com/users/convexopt/followers","following_url":"https://api.github.com/users/convexopt/following{/other_user}","gists_url":"https://api.github.com/users/convexopt/gists{/gist_id}","starred_url":"https://api.github.com/users/convexopt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/convexopt/subscriptions","organizations_url":"https://api.github.com/users/convexopt/orgs","repos_url":"https://api.github.com/users/convexopt/repos","events_url":"https://api.github.com/users/convexopt/events{/privacy}","received_events_url":"https://api.github.com/users/convexopt/received_events","type":"Organization","site_admin":false},"repo":{"id":20954246,"name":"gpkit","full_name":"convexopt/gpkit","owner":{"login":"convexopt","id":7919400,"avatar_url":"https://avatars.githubusercontent.com/u/7919400?v=3","gravatar_id":"","url":"https://api.github.com/users/convexopt","html_url":"https://github.com/convexopt","followers_url":"https://api.github.com/users/convexopt/followers","following_url":"https://api.github.com/users/convexopt/following{/other_user}","gists_url":"https://api.github.com/users/convexopt/gists{/gist_id}","starred_url":"https://api.github.com/users/convexopt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/convexopt/subscriptions","organizations_url":"https://api.github.com/users/convexopt/orgs","repos_url":"https://api.github.com/users/convexopt/repos","events_url":"https://api.github.com/users/convexopt/events{/privacy}","received_events_url":"https://api.github.com/users/convexopt/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/convexopt/gpkit","description":"Python package for defining and manipulating geometric programming models.","fork":false,"url":"https://api.github.com/repos/convexopt/gpkit","forks_url":"https://api.github.com/repos/convexopt/gpkit/forks","keys_url":"https://api.github.com/repos/convexopt/gpkit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/convexopt/gpkit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/convexopt/gpkit/teams","hooks_url":"https://api.github.com/repos/convexopt/gpkit/hooks","issue_events_url":"https://api.github.com/repos/convexopt/gpkit/issues/events{/number}","events_url":"https://api.github.com/repos/convexopt/gpkit/events","assignees_url":"https://api.github.com/repos/convexopt/gpkit/assignees{/user}","branches_url":"https://api.github.com/repos/convexopt/gpkit/branches{/branch}","tags_url":"https://api.github.com/repos/convexopt/gpkit/tags","blobs_url":"https://api.github.com/repos/convexopt/gpkit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/convexopt/gpkit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/convexopt/gpkit/git/refs{/sha}","trees_url":"https://api.github.com/repos/convexopt/gpkit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/convexopt/gpkit/statuses/{sha}","languages_url":"https://api.github.com/repos/convexopt/gpkit/languages","stargazers_url":"https://api.github.com/repos/convexopt/gpkit/stargazers","contributors_url":"https://api.github.com/repos/convexopt/gpkit/contributors","subscribers_url":"https://api.github.com/repos/convexopt/gpkit/subscribers","subscription_url":"https://api.github.com/repos/convexopt/gpkit/subscription","commits_url":"https://api.github.com/repos/convexopt/gpkit/commits{/sha}","git_commits_url":"https://api.github.com/repos/convexopt/gpkit/git/commits{/sha}","comments_url":"https://api.github.com/repos/convexopt/gpkit/comments{/number}","issue_comment_url":"https://api.github.com/repos/convexopt/gpkit/issues/comments{/number}","contents_url":"https://api.github.com/repos/convexopt/gpkit/contents/{+path}","compare_url":"https://api.github.com/repos/convexopt/gpkit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/convexopt/gpkit/merges","archive_url":"https://api.github.com/repos/convexopt/gpkit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/convexopt/gpkit/downloads","issues_url":"https://api.github.com/repos/convexopt/gpkit/issues{/number}","pulls_url":"https://api.github.com/repos/convexopt/gpkit/pulls{/number}","milestones_url":"https://api.github.com/repos/convexopt/gpkit/milestones{/number}","notifications_url":"https://api.github.com/repos/convexopt/gpkit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/convexopt/gpkit/labels{/name}","releases_url":"https://api.github.com/repos/convexopt/gpkit/releases{/id}","created_at":"2014-06-18T08:04:06Z","updated_at":"2015-04-29T01:54:01Z","pushed_at":"2015-04-29T01:54:01Z","git_url":"git://github.com/convexopt/gpkit.git","ssh_url":"git@github.com:convexopt/gpkit.git","clone_url":"https://github.com/convexopt/gpkit.git","svn_url":"https://github.com/convexopt/gpkit","homepage":"http://gpkit.readthedocs.org","size":27472,"stargazers_count":4,"watchers_count":4,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":36,"forks":1,"open_issues":36,"watchers":4,"default_branch":"master"}},"base":{"label":"convexopt:master","ref":"master","sha":"a3404ef40bec65107894751c3b494b5c916b0cce","user":{"login":"convexopt","id":7919400,"avatar_url":"https://avatars.githubusercontent.com/u/7919400?v=3","gravatar_id":"","url":"https://api.github.com/users/convexopt","html_url":"https://github.com/convexopt","followers_url":"https://api.github.com/users/convexopt/followers","following_url":"https://api.github.com/users/convexopt/following{/other_user}","gists_url":"https://api.github.com/users/convexopt/gists{/gist_id}","starred_url":"https://api.github.com/users/convexopt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/convexopt/subscriptions","organizations_url":"https://api.github.com/users/convexopt/orgs","repos_url":"https://api.github.com/users/convexopt/repos","events_url":"https://api.github.com/users/convexopt/events{/privacy}","received_events_url":"https://api.github.com/users/convexopt/received_events","type":"Organization","site_admin":false},"repo":{"id":20954246,"name":"gpkit","full_name":"convexopt/gpkit","owner":{"login":"convexopt","id":7919400,"avatar_url":"https://avatars.githubusercontent.com/u/7919400?v=3","gravatar_id":"","url":"https://api.github.com/users/convexopt","html_url":"https://github.com/convexopt","followers_url":"https://api.github.com/users/convexopt/followers","following_url":"https://api.github.com/users/convexopt/following{/other_user}","gists_url":"https://api.github.com/users/convexopt/gists{/gist_id}","starred_url":"https://api.github.com/users/convexopt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/convexopt/subscriptions","organizations_url":"https://api.github.com/users/convexopt/orgs","repos_url":"https://api.github.com/users/convexopt/repos","events_url":"https://api.github.com/users/convexopt/events{/privacy}","received_events_url":"https://api.github.com/users/convexopt/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/convexopt/gpkit","description":"Python package for defining and manipulating geometric programming models.","fork":false,"url":"https://api.github.com/repos/convexopt/gpkit","forks_url":"https://api.github.com/repos/convexopt/gpkit/forks","keys_url":"https://api.github.com/repos/convexopt/gpkit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/convexopt/gpkit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/convexopt/gpkit/teams","hooks_url":"https://api.github.com/repos/convexopt/gpkit/hooks","issue_events_url":"https://api.github.com/repos/convexopt/gpkit/issues/events{/number}","events_url":"https://api.github.com/repos/convexopt/gpkit/events","assignees_url":"https://api.github.com/repos/convexopt/gpkit/assignees{/user}","branches_url":"https://api.github.com/repos/convexopt/gpkit/branches{/branch}","tags_url":"https://api.github.com/repos/convexopt/gpkit/tags","blobs_url":"https://api.github.com/repos/convexopt/gpkit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/convexopt/gpkit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/convexopt/gpkit/git/refs{/sha}","trees_url":"https://api.github.com/repos/convexopt/gpkit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/convexopt/gpkit/statuses/{sha}","languages_url":"https://api.github.com/repos/convexopt/gpkit/languages","stargazers_url":"https://api.github.com/repos/convexopt/gpkit/stargazers","contributors_url":"https://api.github.com/repos/convexopt/gpkit/contributors","subscribers_url":"https://api.github.com/repos/convexopt/gpkit/subscribers","subscription_url":"https://api.github.com/repos/convexopt/gpkit/subscription","commits_url":"https://api.github.com/repos/convexopt/gpkit/commits{/sha}","git_commits_url":"https://api.github.com/repos/convexopt/gpkit/git/commits{/sha}","comments_url":"https://api.github.com/repos/convexopt/gpkit/comments{/number}","issue_comment_url":"https://api.github.com/repos/convexopt/gpkit/issues/comments{/number}","contents_url":"https://api.github.com/repos/convexopt/gpkit/contents/{+path}","compare_url":"https://api.github.com/repos/convexopt/gpkit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/convexopt/gpkit/merges","archive_url":"https://api.github.com/repos/convexopt/gpkit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/convexopt/gpkit/downloads","issues_url":"https://api.github.com/repos/convexopt/gpkit/issues{/number}","pulls_url":"https://api.github.com/repos/convexopt/gpkit/pulls{/number}","milestones_url":"https://api.github.com/repos/convexopt/gpkit/milestones{/number}","notifications_url":"https://api.github.com/repos/convexopt/gpkit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/convexopt/gpkit/labels{/name}","releases_url":"https://api.github.com/repos/convexopt/gpkit/releases{/id}","created_at":"2014-06-18T08:04:06Z","updated_at":"2015-04-29T01:54:01Z","pushed_at":"2015-04-29T01:54:01Z","git_url":"git://github.com/convexopt/gpkit.git","ssh_url":"git@github.com:convexopt/gpkit.git","clone_url":"https://github.com/convexopt/gpkit.git","svn_url":"https://github.com/convexopt/gpkit","homepage":"http://gpkit.readthedocs.org","size":27472,"stargazers_count":4,"watchers_count":4,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":36,"forks":1,"open_issues":36,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/convexopt/gpkit/pulls/235"},"html":{"href":"https://github.com/convexopt/gpkit/pull/235"},"issue":{"href":"https://api.github.com/repos/convexopt/gpkit/issues/235"},"comments":{"href":"https://api.github.com/repos/convexopt/gpkit/issues/235/comments"},"review_comments":{"href":"https://api.github.com/repos/convexopt/gpkit/pulls/235/comments"},"review_comment":{"href":"https://api.github.com/repos/convexopt/gpkit/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/convexopt/gpkit/pulls/235/commits"},"statuses":{"href":"https://api.github.com/repos/convexopt/gpkit/statuses/58939c9cd63d3a02e93fd1adc6f490b595d5e558"}}}}