Replies: 1 comment
-
|
I'm not sure there's a built in way to do this, could you just flatten the list of lists before you use it? ie flat_opt_list = [opt for opt_list in list_of_lists for opt in opt_list] |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
How do I get a repeatable option with cvs argument to return a list of the individual values? I think an example is needed to clarify what I mean. I want
-n 1,2 -n 3 -n 4,5,6to return[1, 2, 3, 4, 5, 6].In my code, I set multiple=True and type=subclass of ParamType that calls split(','). But for the above command-line example, I got
[[1,2], [3], [4,5,6]]Any suggestion? Thanks in advance.
Beta Was this translation helpful? Give feedback.
All reactions