{"action":"closed","issue":{"url":"https://api.github.com/repos/erikrose/more-itertools/issues/366","repository_url":"https://api.github.com/repos/erikrose/more-itertools","labels_url":"https://api.github.com/repos/erikrose/more-itertools/issues/366/labels{/name}","comments_url":"https://api.github.com/repos/erikrose/more-itertools/issues/366/comments","events_url":"https://api.github.com/repos/erikrose/more-itertools/issues/366/events","html_url":"https://github.com/erikrose/more-itertools/issues/366","id":545006891,"node_id":"MDU6SXNzdWU1NDUwMDY4OTE=","number":366,"title":"Partition throws an exception when None is passed in as predicate","user":{"login":"MSeifert04","id":14200878,"node_id":"MDQ6VXNlcjE0MjAwODc4","avatar_url":"https://avatars2.githubusercontent.com/u/14200878?v=4","gravatar_id":"","url":"https://api.github.com/users/MSeifert04","html_url":"https://github.com/MSeifert04","followers_url":"https://api.github.com/users/MSeifert04/followers","following_url":"https://api.github.com/users/MSeifert04/following{/other_user}","gists_url":"https://api.github.com/users/MSeifert04/gists{/gist_id}","starred_url":"https://api.github.com/users/MSeifert04/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MSeifert04/subscriptions","organizations_url":"https://api.github.com/users/MSeifert04/orgs","repos_url":"https://api.github.com/users/MSeifert04/repos","events_url":"https://api.github.com/users/MSeifert04/events{/privacy}","received_events_url":"https://api.github.com/users/MSeifert04/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2020-01-03T14:06:28Z","updated_at":"2020-01-03T21:10:13Z","closed_at":"2020-01-03T21:10:13Z","author_association":"CONTRIBUTOR","body":"This has changed with #310. Before it worked with `None` as predicate, now it throws an exception:\r\n\r\nVersion 8.0.2:\r\n\r\n```\r\n>>> from more_itertools import partition\r\n>>> f, t = partition(None, [1, 0, 1, 0])\r\n>>> list(f)\r\n...\\lib\\site-packages\\more_itertools\\recipes.py in <genexpr>(.0)\r\n    319     t1, t2 = tee(evaluations)\r\n    320     return (\r\n--> 321         (x for (cond, x) in t1 if not cond),\r\n    322         (x for (cond, x) in t2 if cond),\r\n    323     )\r\n\r\n...\\lib\\site-packages\\more_itertools\\recipes.py in <genexpr>(.0)\r\n    316     \"\"\"\r\n    317     # partition(is_odd, range(10)) --> 0 2 4 6 8   and  1 3 5 7 9\r\n--> 318     evaluations = ((pred(x), x) for x in iterable)\r\n    319     t1, t2 = tee(evaluations)\r\n    320     return (\r\n\r\nTypeError: 'NoneType' object is not callable\r\n```\r\n\r\nVersion 6.0.0\r\n\r\n```\r\n>>> from more_itertools import partition\r\n>>> f, t = partition(None, [1, 0, 1, 0])\r\n>>> list(f)\r\n[0, 0]\r\n```"}}
{"actor":{"display_login":"MSeifert04"}}