Skip to content
Discussion options

You must be logged in to vote

SelectionList takes the selections as positional arguments; so to do what you want you'll want to use the usual Python thing of "unrolling" the list with *. Assuming you'd want to turn them into actual Selection instances too, you'll want something like this:

yield SelectionList[int](*[Selection(file_name, file_no) for file_name, file_no in LIST])

(do double-check, I typed that off the top of my had and it's late on in the afternoon....)

You can see this in passing in the documentation for SelectionList, in the typing section.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@hossman-12
Comment options

Answer selected by hossman-12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants