{"action":"created","comment":{"url":"https://api.github.com/repos/lilaspourpre/exploration_of_news/pulls/comments/44869235","id":44869235,"diff_hunk":"@@ -66,49 +69,51 @@ def insert(self, table_name, column_names=\"\", values=[]):\n                     third+=str(value)\n         self.execution(\"INSERT INTO\", second_part, third)\n         self.con.commit()\n-        return self.connection_off()\n+        return 'commit accepted'\n+\n+    def drop_table(self,table_name): #удаление таблицы\n+        self.cur.execute(\"DROP TABLE IF EXISTS \"+table_name)\n+        return \"done\"\n \n-    def select(self, choice, *args, **kwargs):\n-        print self.connection_on()\n+    def select(self, choice, *args, **kwargs): #адское месиво\n         choix = \"\"\n-        if type(choice)==list:\n-            for i in choice:\n+        if type(choice)==list: #первый пункт - выбор, либо *, либо одно значение, либо список\n+            for i in choice: #если список, то записываем все в строку\n                 if choice.index(i)!=len(choice)-1:","path":"sql_functions.py","position":93,"original_position":93,"commit_id":"027f9aa898af410fddc41b2e7d6e41e4566f45cb","original_commit_id":"027f9aa898af410fddc41b2e7d6e41e4566f45cb","user":{"login":"Cadovvl","id":2242081,"avatar_url":"https://avatars.githubusercontent.com/u/2242081?v=3","gravatar_id":"","url":"https://api.github.com/users/Cadovvl","html_url":"https://github.com/Cadovvl","followers_url":"https://api.github.com/users/Cadovvl/followers","following_url":"https://api.github.com/users/Cadovvl/following{/other_user}","gists_url":"https://api.github.com/users/Cadovvl/gists{/gist_id}","starred_url":"https://api.github.com/users/Cadovvl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Cadovvl/subscriptions","organizations_url":"https://api.github.com/users/Cadovvl/orgs","repos_url":"https://api.github.com/users/Cadovvl/repos","events_url":"https://api.github.com/users/Cadovvl/events{/privacy}","received_events_url":"https://api.github.com/users/Cadovvl/received_events","type":"User","site_admin":false},"body":"Даже несмотря на то, что это ужасное решение... Почему оно у тебя копипастой по всему коду? Если уж оно так тебе дорого - вынеси его в функцию, и вызывай ее.\r\n```\r\njoin(choise, ', ')\r\n```\r\nА там, где нужна предобработка\r\n```\r\njoin([quote(i) for i in values], ', ')\r\n```","created_at":"2015-11-15T09:02:10Z","updated_at":"2015-11-15T09:02:10Z","html_url":"https://github.com/lilaspourpre/exploration_of_news/pull/1#discussion_r44869235","pull_request_url":"https://api.github.com/repos/lilaspourpre/exploration_of_news/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/lilaspourpre/exploration_of_news/pulls/comments/44869235"},"html":{"href":"https://github.com/lilaspourpre/exploration_of_news/pull/1#discussion_r44869235"},"pull_request":{"href":"https://api.github.com/repos/lilaspourpre/exploration_of_news/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/lilaspourpre/exploration_of_news/pulls/1","id":50401454,"html_url":"https://github.com/lilaspourpre/exploration_of_news/pull/1","diff_url":"https://github.com/lilaspourpre/exploration_of_news/pull/1.diff","patch_url":"https://github.com/lilaspourpre/exploration_of_news/pull/1.patch","issue_url":"https://api.github.com/repos/lilaspourpre/exploration_of_news/issues/1","number":1,"state":"open","locked":false,"title":"first working SQL class, needs revision","user":{"login":"lilaspourpre","id":9992898,"avatar_url":"https://avatars.githubusercontent.com/u/9992898?v=3","gravatar_id":"","url":"https://api.github.com/users/lilaspourpre","html_url":"https://github.com/lilaspourpre","followers_url":"https://api.github.com/users/lilaspourpre/followers","following_url":"https://api.github.com/users/lilaspourpre/following{/other_user}","gists_url":"https://api.github.com/users/lilaspourpre/gists{/gist_id}","starred_url":"https://api.github.com/users/lilaspourpre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lilaspourpre/subscriptions","organizations_url":"https://api.github.com/users/lilaspourpre/orgs","repos_url":"https://api.github.com/users/lilaspourpre/repos","events_url":"https://api.github.com/users/lilaspourpre/events{/privacy}","received_events_url":"https://api.github.com/users/lilaspourpre/received_events","type":"User","site_admin":false},"body":"@Cadovvl or @cadovvl ?","created_at":"2015-11-11T16:12:11Z","updated_at":"2015-11-15T09:02:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"38f5eefa9142aaabcfc3684887227eb6123e9ee1","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/lilaspourpre/exploration_of_news/pulls/1/commits","review_comments_url":"https://api.github.com/repos/lilaspourpre/exploration_of_news/pulls/1/comments","review_comment_url":"https://api.github.com/repos/lilaspourpre/exploration_of_news/pulls/comments{/number}","comments_url":"https://api.github.com/repos/lilaspourpre/exploration_of_news/issues/1/comments","statuses_url":"https://api.github.com/repos/lilaspourpre/exploration_of_news/statuses/027f9aa898af410fddc41b2e7d6e41e4566f45cb","head":{"label":"lilaspourpre:first_branch","ref":"first_branch","sha":"027f9aa898af410fddc41b2e7d6e41e4566f45cb","user":{"login":"lilaspourpre","id":9992898,"avatar_url":"https://avatars.githubusercontent.com/u/9992898?v=3","gravatar_id":"","url":"https://api.github.com/users/lilaspourpre","html_url":"https://github.com/lilaspourpre","followers_url":"https://api.github.com/users/lilaspourpre/followers","following_url":"https://api.github.com/users/lilaspourpre/following{/other_user}","gists_url":"https://api.github.com/users/lilaspourpre/gists{/gist_id}","starred_url":"https://api.github.com/users/lilaspourpre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lilaspourpre/subscriptions","organizations_url":"https://api.github.com/users/lilaspourpre/orgs","repos_url":"https://api.github.com/users/lilaspourpre/repos","events_url":"https://api.github.com/users/lilaspourpre/events{/privacy}","received_events_url":"https://api.github.com/users/lilaspourpre/received_events","type":"User","site_admin":false},"repo":{"id":45530773,"name":"exploration_of_news","full_name":"lilaspourpre/exploration_of_news","owner":{"login":"lilaspourpre","id":9992898,"avatar_url":"https://avatars.githubusercontent.com/u/9992898?v=3","gravatar_id":"","url":"https://api.github.com/users/lilaspourpre","html_url":"https://github.com/lilaspourpre","followers_url":"https://api.github.com/users/lilaspourpre/followers","following_url":"https://api.github.com/users/lilaspourpre/following{/other_user}","gists_url":"https://api.github.com/users/lilaspourpre/gists{/gist_id}","starred_url":"https://api.github.com/users/lilaspourpre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lilaspourpre/subscriptions","organizations_url":"https://api.github.com/users/lilaspourpre/orgs","repos_url":"https://api.github.com/users/lilaspourpre/repos","events_url":"https://api.github.com/users/lilaspourpre/events{/privacy}","received_events_url":"https://api.github.com/users/lilaspourpre/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lilaspourpre/exploration_of_news","description":"","fork":false,"url":"https://api.github.com/repos/lilaspourpre/exploration_of_news","forks_url":"https://api.github.com/repos/lilaspourpre/exploration_of_news/forks","keys_url":"https://api.github.com/repos/lilaspourpre/exploration_of_news/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lilaspourpre/exploration_of_news/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lilaspourpre/exploration_of_news/teams","hooks_url":"https://api.github.com/repos/lilaspourpre/exploration_of_news/hooks","issue_events_url":"https://api.github.com/repos/lilaspourpre/exploration_of_news/issues/events{/number}","events_url":"https://api.github.com/repos/lilaspourpre/exploration_of_news/events","assignees_url":"https://api.github.com/repos/lilaspourpre/exploration_of_news/assignees{/user}","branches_url":"https://api.github.com/repos/lilaspourpre/exploration_of_news/branches{/branch}","tags_url":"https://api.github.com/repos/lilaspourpre/exploration_of_news/tags","blobs_url":"https://api.github.com/repos/lilaspourpre/exploration_of_news/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lilaspourpre/exploration_of_news/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lilaspourpre/exploration_of_news/git/refs{/sha}","trees_url":"https://api.github.com/repos/lilaspourpre/exploration_of_news/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lilaspourpre/exploration_of_news/statuses/{sha}","languages_url":"https://api.github.com/repos/lilaspourpre/exploration_of_news/languages","stargazers_url":"https://api.github.com/repos/lilaspourpre/exploration_of_news/stargazers","contributors_url":"https://api.github.com/repos/lilaspourpre/exploration_of_news/contributors","subscribers_url":"https://api.github.com/repos/lilaspourpre/exploration_of_news/subscribers","subscription_url":"https://api.github.com/repos/lilaspourpre/exploration_of_news/subscription","commits_url":"https://api.github.com/repos/lilaspourpre/exploration_of_news/commits{/sha}","git_commits_url":"https://api.github.com/repos/lilaspourpre/exploration_of_news/git/commits{/sha}","comments_url":"https://api.github.com/repos/lilaspourpre/exploration_of_news/comments{/number}","issue_comment_url":"https://api.github.com/repos/lilaspourpre/exploration_of_news/issues/comments{/number}","contents_url":"https://api.github.com/repos/lilaspourpre/exploration_of_news/contents/{+path}","compare_url":"https://api.github.com/repos/lilaspourpre/exploration_of_news/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lilaspourpre/exploration_of_news/merges","archive_url":"https://api.github.com/repos/lilaspourpre/exploration_of_news/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lilaspourpre/exploration_of_news/downloads","issues_url":"https://api.github.com/repos/lilaspourpre/exploration_of_news/issues{/number}","pulls_url":"https://api.github.com/repos/lilaspourpre/exploration_of_news/pulls{/number}","milestones_url":"https://api.github.com/repos/lilaspourpre/exploration_of_news/milestones{/number}","notifications_url":"https://api.github.com/repos/lilaspourpre/exploration_of_news/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lilaspourpre/exploration_of_news/labels{/name}","releases_url":"https://api.github.com/repos/lilaspourpre/exploration_of_news/releases{/id}","created_at":"2015-11-04T10:09:31Z","updated_at":"2015-11-04T10:10:05Z","pushed_at":"2015-11-13T20:14:56Z","git_url":"git://github.com/lilaspourpre/exploration_of_news.git","ssh_url":"git@github.com:lilaspourpre/exploration_of_news.git","clone_url":"https://github.com/lilaspourpre/exploration_of_news.git","svn_url":"https://github.com/lilaspourpre/exploration_of_news","homepage":null,"size":132,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"lilaspourpre:master","ref":"master","sha":"a57e84f9fbcc4d93381784d19f5672a035b75f59","user":{"login":"lilaspourpre","id":9992898,"avatar_url":"https://avatars.githubusercontent.com/u/9992898?v=3","gravatar_id":"","url":"https://api.github.com/users/lilaspourpre","html_url":"https://github.com/lilaspourpre","followers_url":"https://api.github.com/users/lilaspourpre/followers","following_url":"https://api.github.com/users/lilaspourpre/following{/other_user}","gists_url":"https://api.github.com/users/lilaspourpre/gists{/gist_id}","starred_url":"https://api.github.com/users/lilaspourpre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lilaspourpre/subscriptions","organizations_url":"https://api.github.com/users/lilaspourpre/orgs","repos_url":"https://api.github.com/users/lilaspourpre/repos","events_url":"https://api.github.com/users/lilaspourpre/events{/privacy}","received_events_url":"https://api.github.com/users/lilaspourpre/received_events","type":"User","site_admin":false},"repo":{"id":45530773,"name":"exploration_of_news","full_name":"lilaspourpre/exploration_of_news","owner":{"login":"lilaspourpre","id":9992898,"avatar_url":"https://avatars.githubusercontent.com/u/9992898?v=3","gravatar_id":"","url":"https://api.github.com/users/lilaspourpre","html_url":"https://github.com/lilaspourpre","followers_url":"https://api.github.com/users/lilaspourpre/followers","following_url":"https://api.github.com/users/lilaspourpre/following{/other_user}","gists_url":"https://api.github.com/users/lilaspourpre/gists{/gist_id}","starred_url":"https://api.github.com/users/lilaspourpre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lilaspourpre/subscriptions","organizations_url":"https://api.github.com/users/lilaspourpre/orgs","repos_url":"https://api.github.com/users/lilaspourpre/repos","events_url":"https://api.github.com/users/lilaspourpre/events{/privacy}","received_events_url":"https://api.github.com/users/lilaspourpre/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lilaspourpre/exploration_of_news","description":"","fork":false,"url":"https://api.github.com/repos/lilaspourpre/exploration_of_news","forks_url":"https://api.github.com/repos/lilaspourpre/exploration_of_news/forks","keys_url":"https://api.github.com/repos/lilaspourpre/exploration_of_news/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lilaspourpre/exploration_of_news/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lilaspourpre/exploration_of_news/teams","hooks_url":"https://api.github.com/repos/lilaspourpre/exploration_of_news/hooks","issue_events_url":"https://api.github.com/repos/lilaspourpre/exploration_of_news/issues/events{/number}","events_url":"https://api.github.com/repos/lilaspourpre/exploration_of_news/events","assignees_url":"https://api.github.com/repos/lilaspourpre/exploration_of_news/assignees{/user}","branches_url":"https://api.github.com/repos/lilaspourpre/exploration_of_news/branches{/branch}","tags_url":"https://api.github.com/repos/lilaspourpre/exploration_of_news/tags","blobs_url":"https://api.github.com/repos/lilaspourpre/exploration_of_news/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lilaspourpre/exploration_of_news/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lilaspourpre/exploration_of_news/git/refs{/sha}","trees_url":"https://api.github.com/repos/lilaspourpre/exploration_of_news/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lilaspourpre/exploration_of_news/statuses/{sha}","languages_url":"https://api.github.com/repos/lilaspourpre/exploration_of_news/languages","stargazers_url":"https://api.github.com/repos/lilaspourpre/exploration_of_news/stargazers","contributors_url":"https://api.github.com/repos/lilaspourpre/exploration_of_news/contributors","subscribers_url":"https://api.github.com/repos/lilaspourpre/exploration_of_news/subscribers","subscription_url":"https://api.github.com/repos/lilaspourpre/exploration_of_news/subscription","commits_url":"https://api.github.com/repos/lilaspourpre/exploration_of_news/commits{/sha}","git_commits_url":"https://api.github.com/repos/lilaspourpre/exploration_of_news/git/commits{/sha}","comments_url":"https://api.github.com/repos/lilaspourpre/exploration_of_news/comments{/number}","issue_comment_url":"https://api.github.com/repos/lilaspourpre/exploration_of_news/issues/comments{/number}","contents_url":"https://api.github.com/repos/lilaspourpre/exploration_of_news/contents/{+path}","compare_url":"https://api.github.com/repos/lilaspourpre/exploration_of_news/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lilaspourpre/exploration_of_news/merges","archive_url":"https://api.github.com/repos/lilaspourpre/exploration_of_news/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lilaspourpre/exploration_of_news/downloads","issues_url":"https://api.github.com/repos/lilaspourpre/exploration_of_news/issues{/number}","pulls_url":"https://api.github.com/repos/lilaspourpre/exploration_of_news/pulls{/number}","milestones_url":"https://api.github.com/repos/lilaspourpre/exploration_of_news/milestones{/number}","notifications_url":"https://api.github.com/repos/lilaspourpre/exploration_of_news/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lilaspourpre/exploration_of_news/labels{/name}","releases_url":"https://api.github.com/repos/lilaspourpre/exploration_of_news/releases{/id}","created_at":"2015-11-04T10:09:31Z","updated_at":"2015-11-04T10:10:05Z","pushed_at":"2015-11-13T20:14:56Z","git_url":"git://github.com/lilaspourpre/exploration_of_news.git","ssh_url":"git@github.com:lilaspourpre/exploration_of_news.git","clone_url":"https://github.com/lilaspourpre/exploration_of_news.git","svn_url":"https://github.com/lilaspourpre/exploration_of_news","homepage":null,"size":132,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/lilaspourpre/exploration_of_news/pulls/1"},"html":{"href":"https://github.com/lilaspourpre/exploration_of_news/pull/1"},"issue":{"href":"https://api.github.com/repos/lilaspourpre/exploration_of_news/issues/1"},"comments":{"href":"https://api.github.com/repos/lilaspourpre/exploration_of_news/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/lilaspourpre/exploration_of_news/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/lilaspourpre/exploration_of_news/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/lilaspourpre/exploration_of_news/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/lilaspourpre/exploration_of_news/statuses/027f9aa898af410fddc41b2e7d6e41e4566f45cb"}}}}