Ian Lin
Ian Lin
@benbowen I'm planning to implement this next week.
Thanks @ori-levi, This might be a good starting point. I tried to implement a general version for all kinds of splitters a few months ago, but I found that there...
> I think the approach you've suggested above would add an additional level of processing, right? (since we'd create the items and then have to process them again with the...
> Right exactly. What are your thoughts on adding this to the splitter/reducer functions directly then @ianlini ? > def reducer(key, value): > I used hook as I was recently...
Thanks for your contribution. I'm thinking about a more general way to fulfill your requirement because `keep_element_types` looks too specific to some specific cases. I have 2 alternatives in my...
An example for the usage: ```python3 >>> flatten({'a': ['b', 'c']}, enumerate_types=(list,), keep_element_types=(str,)) ``` is equivalent to ```python3 def is_list_of_nonstr(parent, obj): return isinstance(obj, list) and not any(isinstance(val, str) for val in...
You can do more interesting things like this: ```python3 from some_type_checking_tool import check def is_list_of_str(parent, obj): return check(obj, list[str]) def is_the_specific_key(parent, obj): return parent == ("the", "specific", "key") ```
Will do it when I have time. Issue created: #54. Thanks.
Thanks. I'm very interested in mypy, but didn't have time to learn it. I will spend some time understanding this PR.
Are you using the comments because we are still supporting Python 2.7? I think it's time to remove it so that we can use the type annotation.