Jeff Sasmor writes:
> Is there a (straightforward?) way to dynamically compose function
> argument lists? For example, in C, you can write"
>
> f(arg1, arg2, (conditional expression)?(val for TRUE state):(val for FALSE state)).
Others have pointed out, that you can use
"and" and "or" to emul
: [Zope] brain hurts regarding dynamic fcn args in Python
>
>
> > Is there a (straightforward?) way to dynamically compose function
> > argument lists? For example, in C, you can write"
> >
> > f(arg1, arg2, (conditional expression)?(val for TRUE
> > state):(
> Is there a (straightforward?) way to dynamically compose function
> argument lists? For example, in C, you can write"
>
> f(arg1, arg2, (conditional expression)?(val for TRUE
> state):(val for FALSE state)).
This can be emulated in Python by the boolean logic:
( ({conditional expression}) a