[Map Function] add assert statement if map function does not return dict or None
CONTRIBUTOR
Also added to an assert statement that if a dict is returned by function, all values of `dicts` are `lists`
2020-04-22T08:23:12Z
https://github.com/huggingface/datasets/pull/12#issuecomment-617629452
https://api.github.com/repos/huggingface/datasets/issues/12
MDEyOklzc3VlQ29tbWVudDYxNzYyOTQ1Mg==
https://api.github.com/repos/huggingface/datasets/issues/comments/617629452/reactions
2020-04-22T08:23:12Z
https://api.github.com/repos/huggingface/datasets/issues/comments/617629452
https://avatars.githubusercontent.com/u/23423619?v=4
https://api.github.com/users/patrickvonplaten/events{/privacy}
https://api.github.com/users/patrickvonplaten/followers
https://api.github.com/users/patrickvonplaten/following{/other_user}
https://api.github.com/users/patrickvonplaten/gists{/gist_id}
https://github.com/patrickvonplaten
patrickvonplaten
MDQ6VXNlcjIzNDIzNjE5
https://api.github.com/users/patrickvonplaten/orgs
https://api.github.com/users/patrickvonplaten/received_events
https://api.github.com/users/patrickvonplaten/repos
https://api.github.com/users/patrickvonplaten/starred{/owner}{/repo}
https://api.github.com/users/patrickvonplaten/subscriptions
User
https://api.github.com/users/patrickvonplaten
public
CONTRIBUTOR
Wait to merge until `make style` is set in place.
2020-04-22T08:23:30Z
https://github.com/huggingface/datasets/pull/12#issuecomment-617629597
https://api.github.com/repos/huggingface/datasets/issues/12
MDEyOklzc3VlQ29tbWVudDYxNzYyOTU5Nw==
https://api.github.com/repos/huggingface/datasets/issues/comments/617629597/reactions
2020-04-22T08:23:30Z
https://api.github.com/repos/huggingface/datasets/issues/comments/617629597
https://avatars.githubusercontent.com/u/23423619?v=4
https://api.github.com/users/patrickvonplaten/events{/privacy}
https://api.github.com/users/patrickvonplaten/followers
https://api.github.com/users/patrickvonplaten/following{/other_user}
https://api.github.com/users/patrickvonplaten/gists{/gist_id}
https://github.com/patrickvonplaten
patrickvonplaten
MDQ6VXNlcjIzNDIzNjE5
https://api.github.com/users/patrickvonplaten/orgs
https://api.github.com/users/patrickvonplaten/received_events
https://api.github.com/users/patrickvonplaten/repos
https://api.github.com/users/patrickvonplaten/starred{/owner}{/repo}
https://api.github.com/users/patrickvonplaten/subscriptions
User
https://api.github.com/users/patrickvonplaten
public
CONTRIBUTOR
Updated the assert statements. Played around with multiple cases and it should be good now IMO. 
2020-04-23T08:23:13Z
https://github.com/huggingface/datasets/pull/12#issuecomment-618256874
https://api.github.com/repos/huggingface/datasets/issues/12
MDEyOklzc3VlQ29tbWVudDYxODI1Njg3NA==
https://api.github.com/repos/huggingface/datasets/issues/comments/618256874/reactions
2020-04-23T08:23:13Z
https://api.github.com/repos/huggingface/datasets/issues/comments/618256874
https://avatars.githubusercontent.com/u/23423619?v=4
https://api.github.com/users/patrickvonplaten/events{/privacy}
https://api.github.com/users/patrickvonplaten/followers
https://api.github.com/users/patrickvonplaten/following{/other_user}
https://api.github.com/users/patrickvonplaten/gists{/gist_id}
https://github.com/patrickvonplaten
patrickvonplaten
MDQ6VXNlcjIzNDIzNjE5
https://api.github.com/users/patrickvonplaten/orgs
https://api.github.com/users/patrickvonplaten/received_events
https://api.github.com/users/patrickvonplaten/repos
https://api.github.com/users/patrickvonplaten/starred{/owner}{/repo}
https://api.github.com/users/patrickvonplaten/subscriptions
User
https://api.github.com/users/patrickvonplaten
public
IMO, if a function is provided that is not a print statement (-> returns variable of type `None`) or a function that updates the datasets (-> returns variable of type `dict`), then a `TypeError` should be raised. 

Not sure whether you had cases in mind where the user should do something else @thomwolf , but I think a lot of silent errors can be avoided with this assert statement.