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

nipype

#1

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


#2

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.


#3

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