Oops, I'm not quite right about this. This FAQ explains it better...
http://www.python.org/doc/FAQ.html#4.16
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Monday, June 19, 2000 4:51 PM
> To: [EMAIL PROTECTED]
> Subject: RE: [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):(val for FALSE state)).
>
> This can be emulated in Python by the boolean logic:
>
> ( ({conditional expression}) and {TRUE val} ) or {FALSE val}
>
> e.g.
>
> a = ( ( (x > 1) and "biggerthanone" ) or "smallerthanone" )
>
> >>> x = 0
> >>> a = ( (x > 1) and "biggerthanone" ) or "smallerthanone"
> >>> a
> 'smallerthanone'
>
> >
> > Or one can embed a fcn call within an argument list in order
> > to supply a
> > needed function parameter.
>
>
> Hrm.. I *think* this will work as a function argment. Sure.. why not?
>
>
> _______________________________________________
> Zope maillist - [EMAIL PROTECTED]
> http://lists.zope.org/mailman/listinfo/zope
> ** No cross posts or HTML encoding! **
> (Related lists -
> http://lists.zope.org/mailman/listinfo/zope-announce
> http://lists.zope.org/mailman/listinfo/zope-dev )
>
>
> ---
>
> _______________________________________________
> Zope maillist - [EMAIL PROTECTED]
> http://lists.zope.org/mailman/listinfo/zope
> ** No cross posts or HTML encoding! **
> (Related lists -
> http://lists.zope.org/mailman/listinfo/zope-announce
> http://lists.zope.org/mailman/listinfo/zope-dev )
>
_______________________________________________
Zope maillist - [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
http://lists.zope.org/mailman/listinfo/zope-announce
http://lists.zope.org/mailman/listinfo/zope-dev )