Could someone digest the role/functioning of InputMultiPath for me?

docstring, besides warning that it “should only be used as a final resort” talks about it accepting “paths to files or directories”, which many interfaces do with InputMultiPath(File(…

But then there is a bunch of interfaces defining InputMultiPath for types Int, traits.List(traits.Float(), etc

It converts single entities to lists of length one. It’s convenient because user can do

a.inputs.foo = 'something'

or

a.inputs.foo = ['something']

and inside the interface you can do a for loop without checking what was presented as an input.

Despite its name works for other data types than paths.

1 Like

the name will change in the traitlets update. i think to: InputMultiObject, open for discussion.

2 Likes