{"action":"created","comment":{"url":"https://api.github.com/repos/erikrose/more-itertools/pulls/comments/144617064","pull_request_review_id":69302110,"id":144617064,"diff_hunk":"@@ -1119,7 +1119,7 @@ def divide(n, iterable):\n     return ret\n \n \n-def always_iterable(obj):\n+def always_iterable(obj, base_type=(text_type, binary_type)):","path":"more_itertools/more.py","position":5,"original_position":5,"commit_id":"60d23f8b7f198aabb665f4d47161a7c26b1bdcfb","original_commit_id":"60d23f8b7f198aabb665f4d47161a7c26b1bdcfb","user":{"login":"jaraco","id":308610,"avatar_url":"https://avatars2.githubusercontent.com/u/308610?v=4","gravatar_id":"","url":"https://api.github.com/users/jaraco","html_url":"https://github.com/jaraco","followers_url":"https://api.github.com/users/jaraco/followers","following_url":"https://api.github.com/users/jaraco/following{/other_user}","gists_url":"https://api.github.com/users/jaraco/gists{/gist_id}","starred_url":"https://api.github.com/users/jaraco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaraco/subscriptions","organizations_url":"https://api.github.com/users/jaraco/orgs","repos_url":"https://api.github.com/users/jaraco/repos","events_url":"https://api.github.com/users/jaraco/events{/privacy}","received_events_url":"https://api.github.com/users/jaraco/received_events","type":"User","site_admin":false},"body":"hmm. I don't like `*unitary_types` - that deviates from standard practice as found in `collapse()`, `isinstance()`, and in the `except` clause. Plus, it confines the signature (satisfying all positional arguments and disallowing passing by keyword):\r\n\r\n```\r\n>>> def always_iterable(item, *unitary_types): pass\r\n... \r\n>>> always_iterable(None, unitary_types=(str,))\r\nTraceback (most recent call last):\r\n  File \"<stdin>\", line 1, in <module>\r\nTypeError: always_iterable() got an unexpected keyword argument 'unitary_types'\r\n```\r\n\r\nMaybe the signature will never need an additional parameter, but my instinct is a single parameter is preferable.","created_at":"2017-10-13T17:46:44Z","updated_at":"2017-10-13T17:46:44Z","html_url":"https://github.com/erikrose/more-itertools/pull/165#discussion_r144617064","pull_request_url":"https://api.github.com/repos/erikrose/more-itertools/pulls/165","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/erikrose/more-itertools/pulls/comments/144617064"},"html":{"href":"https://github.com/erikrose/more-itertools/pull/165#discussion_r144617064"},"pull_request":{"href":"https://api.github.com/repos/erikrose/more-itertools/pulls/165"}},"in_reply_to_id":144163748},"pull_request":{"url":"https://api.github.com/repos/erikrose/more-itertools/pulls/165","id":145312425,"html_url":"https://github.com/erikrose/more-itertools/pull/165","diff_url":"https://github.com/erikrose/more-itertools/pull/165.diff","patch_url":"https://github.com/erikrose/more-itertools/pull/165.patch","issue_url":"https://api.github.com/repos/erikrose/more-itertools/issues/165","number":165,"state":"open","locked":false,"title":"Add base_type argument to always_iterable()","user":{"login":"bbayles","id":1922815,"avatar_url":"https://avatars0.githubusercontent.com/u/1922815?v=4","gravatar_id":"","url":"https://api.github.com/users/bbayles","html_url":"https://github.com/bbayles","followers_url":"https://api.github.com/users/bbayles/followers","following_url":"https://api.github.com/users/bbayles/following{/other_user}","gists_url":"https://api.github.com/users/bbayles/gists{/gist_id}","starred_url":"https://api.github.com/users/bbayles/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bbayles/subscriptions","organizations_url":"https://api.github.com/users/bbayles/orgs","repos_url":"https://api.github.com/users/bbayles/repos","events_url":"https://api.github.com/users/bbayles/events{/privacy}","received_events_url":"https://api.github.com/users/bbayles/received_events","type":"User","site_admin":false},"body":"Re: Issue #164, this PR adds a `base_type` argument to `always_iterable`.\r\n\r\nThis allows for the \"by default, strings are not considered iterable\" behavior to be overridden, and allows other types (e.g. `dict`) to be considered non-iterable.","created_at":"2017-10-07T22:56:41Z","updated_at":"2017-10-13T17:46:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"426326a1db944a0c1f59ee6c5fa7b8111a6c5f0e","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/erikrose/more-itertools/pulls/165/commits","review_comments_url":"https://api.github.com/repos/erikrose/more-itertools/pulls/165/comments","review_comment_url":"https://api.github.com/repos/erikrose/more-itertools/pulls/comments{/number}","comments_url":"https://api.github.com/repos/erikrose/more-itertools/issues/165/comments","statuses_url":"https://api.github.com/repos/erikrose/more-itertools/statuses/60d23f8b7f198aabb665f4d47161a7c26b1bdcfb","head":{"label":"erikrose:always-iterable-base","ref":"always-iterable-base","sha":"60d23f8b7f198aabb665f4d47161a7c26b1bdcfb","user":{"login":"erikrose","id":295816,"avatar_url":"https://avatars3.githubusercontent.com/u/295816?v=4","gravatar_id":"","url":"https://api.github.com/users/erikrose","html_url":"https://github.com/erikrose","followers_url":"https://api.github.com/users/erikrose/followers","following_url":"https://api.github.com/users/erikrose/following{/other_user}","gists_url":"https://api.github.com/users/erikrose/gists{/gist_id}","starred_url":"https://api.github.com/users/erikrose/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erikrose/subscriptions","organizations_url":"https://api.github.com/users/erikrose/orgs","repos_url":"https://api.github.com/users/erikrose/repos","events_url":"https://api.github.com/users/erikrose/events{/privacy}","received_events_url":"https://api.github.com/users/erikrose/received_events","type":"User","site_admin":false},"repo":{"id":4144530,"name":"more-itertools","full_name":"erikrose/more-itertools","owner":{"login":"erikrose","id":295816,"avatar_url":"https://avatars3.githubusercontent.com/u/295816?v=4","gravatar_id":"","url":"https://api.github.com/users/erikrose","html_url":"https://github.com/erikrose","followers_url":"https://api.github.com/users/erikrose/followers","following_url":"https://api.github.com/users/erikrose/following{/other_user}","gists_url":"https://api.github.com/users/erikrose/gists{/gist_id}","starred_url":"https://api.github.com/users/erikrose/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erikrose/subscriptions","organizations_url":"https://api.github.com/users/erikrose/orgs","repos_url":"https://api.github.com/users/erikrose/repos","events_url":"https://api.github.com/users/erikrose/events{/privacy}","received_events_url":"https://api.github.com/users/erikrose/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/erikrose/more-itertools","description":"More routines for operating on iterables, beyond itertools","fork":false,"url":"https://api.github.com/repos/erikrose/more-itertools","forks_url":"https://api.github.com/repos/erikrose/more-itertools/forks","keys_url":"https://api.github.com/repos/erikrose/more-itertools/keys{/key_id}","collaborators_url":"https://api.github.com/repos/erikrose/more-itertools/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/erikrose/more-itertools/teams","hooks_url":"https://api.github.com/repos/erikrose/more-itertools/hooks","issue_events_url":"https://api.github.com/repos/erikrose/more-itertools/issues/events{/number}","events_url":"https://api.github.com/repos/erikrose/more-itertools/events","assignees_url":"https://api.github.com/repos/erikrose/more-itertools/assignees{/user}","branches_url":"https://api.github.com/repos/erikrose/more-itertools/branches{/branch}","tags_url":"https://api.github.com/repos/erikrose/more-itertools/tags","blobs_url":"https://api.github.com/repos/erikrose/more-itertools/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/erikrose/more-itertools/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/erikrose/more-itertools/git/refs{/sha}","trees_url":"https://api.github.com/repos/erikrose/more-itertools/git/trees{/sha}","statuses_url":"https://api.github.com/repos/erikrose/more-itertools/statuses/{sha}","languages_url":"https://api.github.com/repos/erikrose/more-itertools/languages","stargazers_url":"https://api.github.com/repos/erikrose/more-itertools/stargazers","contributors_url":"https://api.github.com/repos/erikrose/more-itertools/contributors","subscribers_url":"https://api.github.com/repos/erikrose/more-itertools/subscribers","subscription_url":"https://api.github.com/repos/erikrose/more-itertools/subscription","commits_url":"https://api.github.com/repos/erikrose/more-itertools/commits{/sha}","git_commits_url":"https://api.github.com/repos/erikrose/more-itertools/git/commits{/sha}","comments_url":"https://api.github.com/repos/erikrose/more-itertools/comments{/number}","issue_comment_url":"https://api.github.com/repos/erikrose/more-itertools/issues/comments{/number}","contents_url":"https://api.github.com/repos/erikrose/more-itertools/contents/{+path}","compare_url":"https://api.github.com/repos/erikrose/more-itertools/compare/{base}...{head}","merges_url":"https://api.github.com/repos/erikrose/more-itertools/merges","archive_url":"https://api.github.com/repos/erikrose/more-itertools/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/erikrose/more-itertools/downloads","issues_url":"https://api.github.com/repos/erikrose/more-itertools/issues{/number}","pulls_url":"https://api.github.com/repos/erikrose/more-itertools/pulls{/number}","milestones_url":"https://api.github.com/repos/erikrose/more-itertools/milestones{/number}","notifications_url":"https://api.github.com/repos/erikrose/more-itertools/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/erikrose/more-itertools/labels{/name}","releases_url":"https://api.github.com/repos/erikrose/more-itertools/releases{/id}","deployments_url":"https://api.github.com/repos/erikrose/more-itertools/deployments","created_at":"2012-04-26T05:15:14Z","updated_at":"2017-10-11T12:45:33Z","pushed_at":"2017-10-08T17:58:31Z","git_url":"git://github.com/erikrose/more-itertools.git","ssh_url":"git@github.com:erikrose/more-itertools.git","clone_url":"https://github.com/erikrose/more-itertools.git","svn_url":"https://github.com/erikrose/more-itertools","homepage":null,"size":489,"stargazers_count":352,"watchers_count":352,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":48,"mirror_url":null,"open_issues_count":2,"forks":48,"open_issues":2,"watchers":352,"default_branch":"master"}},"base":{"label":"erikrose:master","ref":"master","sha":"dbc7a9d3bb62a22a70c83807dce10d46f3a4bfc6","user":{"login":"erikrose","id":295816,"avatar_url":"https://avatars3.githubusercontent.com/u/295816?v=4","gravatar_id":"","url":"https://api.github.com/users/erikrose","html_url":"https://github.com/erikrose","followers_url":"https://api.github.com/users/erikrose/followers","following_url":"https://api.github.com/users/erikrose/following{/other_user}","gists_url":"https://api.github.com/users/erikrose/gists{/gist_id}","starred_url":"https://api.github.com/users/erikrose/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erikrose/subscriptions","organizations_url":"https://api.github.com/users/erikrose/orgs","repos_url":"https://api.github.com/users/erikrose/repos","events_url":"https://api.github.com/users/erikrose/events{/privacy}","received_events_url":"https://api.github.com/users/erikrose/received_events","type":"User","site_admin":false},"repo":{"id":4144530,"name":"more-itertools","full_name":"erikrose/more-itertools","owner":{"login":"erikrose","id":295816,"avatar_url":"https://avatars3.githubusercontent.com/u/295816?v=4","gravatar_id":"","url":"https://api.github.com/users/erikrose","html_url":"https://github.com/erikrose","followers_url":"https://api.github.com/users/erikrose/followers","following_url":"https://api.github.com/users/erikrose/following{/other_user}","gists_url":"https://api.github.com/users/erikrose/gists{/gist_id}","starred_url":"https://api.github.com/users/erikrose/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erikrose/subscriptions","organizations_url":"https://api.github.com/users/erikrose/orgs","repos_url":"https://api.github.com/users/erikrose/repos","events_url":"https://api.github.com/users/erikrose/events{/privacy}","received_events_url":"https://api.github.com/users/erikrose/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/erikrose/more-itertools","description":"More routines for operating on iterables, beyond itertools","fork":false,"url":"https://api.github.com/repos/erikrose/more-itertools","forks_url":"https://api.github.com/repos/erikrose/more-itertools/forks","keys_url":"https://api.github.com/repos/erikrose/more-itertools/keys{/key_id}","collaborators_url":"https://api.github.com/repos/erikrose/more-itertools/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/erikrose/more-itertools/teams","hooks_url":"https://api.github.com/repos/erikrose/more-itertools/hooks","issue_events_url":"https://api.github.com/repos/erikrose/more-itertools/issues/events{/number}","events_url":"https://api.github.com/repos/erikrose/more-itertools/events","assignees_url":"https://api.github.com/repos/erikrose/more-itertools/assignees{/user}","branches_url":"https://api.github.com/repos/erikrose/more-itertools/branches{/branch}","tags_url":"https://api.github.com/repos/erikrose/more-itertools/tags","blobs_url":"https://api.github.com/repos/erikrose/more-itertools/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/erikrose/more-itertools/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/erikrose/more-itertools/git/refs{/sha}","trees_url":"https://api.github.com/repos/erikrose/more-itertools/git/trees{/sha}","statuses_url":"https://api.github.com/repos/erikrose/more-itertools/statuses/{sha}","languages_url":"https://api.github.com/repos/erikrose/more-itertools/languages","stargazers_url":"https://api.github.com/repos/erikrose/more-itertools/stargazers","contributors_url":"https://api.github.com/repos/erikrose/more-itertools/contributors","subscribers_url":"https://api.github.com/repos/erikrose/more-itertools/subscribers","subscription_url":"https://api.github.com/repos/erikrose/more-itertools/subscription","commits_url":"https://api.github.com/repos/erikrose/more-itertools/commits{/sha}","git_commits_url":"https://api.github.com/repos/erikrose/more-itertools/git/commits{/sha}","comments_url":"https://api.github.com/repos/erikrose/more-itertools/comments{/number}","issue_comment_url":"https://api.github.com/repos/erikrose/more-itertools/issues/comments{/number}","contents_url":"https://api.github.com/repos/erikrose/more-itertools/contents/{+path}","compare_url":"https://api.github.com/repos/erikrose/more-itertools/compare/{base}...{head}","merges_url":"https://api.github.com/repos/erikrose/more-itertools/merges","archive_url":"https://api.github.com/repos/erikrose/more-itertools/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/erikrose/more-itertools/downloads","issues_url":"https://api.github.com/repos/erikrose/more-itertools/issues{/number}","pulls_url":"https://api.github.com/repos/erikrose/more-itertools/pulls{/number}","milestones_url":"https://api.github.com/repos/erikrose/more-itertools/milestones{/number}","notifications_url":"https://api.github.com/repos/erikrose/more-itertools/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/erikrose/more-itertools/labels{/name}","releases_url":"https://api.github.com/repos/erikrose/more-itertools/releases{/id}","deployments_url":"https://api.github.com/repos/erikrose/more-itertools/deployments","created_at":"2012-04-26T05:15:14Z","updated_at":"2017-10-11T12:45:33Z","pushed_at":"2017-10-08T17:58:31Z","git_url":"git://github.com/erikrose/more-itertools.git","ssh_url":"git@github.com:erikrose/more-itertools.git","clone_url":"https://github.com/erikrose/more-itertools.git","svn_url":"https://github.com/erikrose/more-itertools","homepage":null,"size":489,"stargazers_count":352,"watchers_count":352,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":48,"mirror_url":null,"open_issues_count":2,"forks":48,"open_issues":2,"watchers":352,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/erikrose/more-itertools/pulls/165"},"html":{"href":"https://github.com/erikrose/more-itertools/pull/165"},"issue":{"href":"https://api.github.com/repos/erikrose/more-itertools/issues/165"},"comments":{"href":"https://api.github.com/repos/erikrose/more-itertools/issues/165/comments"},"review_comments":{"href":"https://api.github.com/repos/erikrose/more-itertools/pulls/165/comments"},"review_comment":{"href":"https://api.github.com/repos/erikrose/more-itertools/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/erikrose/more-itertools/pulls/165/commits"},"statuses":{"href":"https://api.github.com/repos/erikrose/more-itertools/statuses/60d23f8b7f198aabb665f4d47161a7c26b1bdcfb"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"jaraco"}}