[Libguestfs] IRC question about ?foo etc

Cedric Bosdonnat cbosdonnat at suse.com
Mon Jan 9 07:51:12 UTC 2017


Hi Richard,

Thanks for taking the time to provide such interesting explanations!
Very interesting reading in the morning ;)

--
Cedric

On Sun, 2017-01-08 at 23:21 +0000, Richard W.M. Jones wrote:
> On Sun, Jan 08, 2017 at 11:13:42PM +0000, Richard W.M. Jones wrote:
> >   let other_func ~foo ~bar ?baz =
> >     func ~foo ~bar ?baz
> 
> Actually there is a third issue which is what makes this even
> more confusing.
> 
> ?baz (when calling a function) expects that baz (the binding) is an
> option, and passes either nothing (if baz = None) or the optional
> argument (if baz <> None).  In effect it means pass baz directly to
> the function, since the function implementation is expecting an option
> type for this parameter.
> 
> Rich.
> 




More information about the Libguestfs mailing list