add splits positional argument to specify the number of split nodes

This commit is contained in:
Davide Depau 2017-07-10 20:06:37 +02:00
parent 5d78a2595d
commit f0ea9614cd

View File

@ -50,8 +50,8 @@ def filter_(stream_spec, filter_name, *args, **kwargs):
@filter_operator()
def split(stream):
return FilterNode(stream, split.__name__)
def split(stream, splits=None):
return FilterNode(stream, split.__name__, args=[splits] if splits else [],)
@filter_operator()