Block.filter and Segment.filter should do use "OR" but "AND" by default
@JuliaSprenger @mdenker @Kleinjohann
Block.filter and Segment.filter should do use "OR" but "AND" by default.
It is more natural when you do a query to have a list of condition linked by "AND".
For instance: data_type='lfp' AND quality == 'good'.
What Block.filter(targetdict=dict(data_type='lfp', quality == 'good'`)) do is data_type='lfp' OR quality == 'good'. I think this is not very intuitive.
The AND statement in filter(...) is implemented with a list of taretdict.
I found this very consufing.
For intsance neo.utils.get_events do more or less the same thing have an intinsinct AND by default.
This make the Segment.filter and neo.utils.get_events inconsistent.
What do you think ?
Suggestion from @mdenker that we add a keyword argument to choose between AND and OR, set to OR by default for backwards compatibility, but with a deprecation warning that the default will change.