Hi- I guess I'm somewhere past a 'newbie' (after a few solid months)
and I'm developing a calendar-based (but not based on calendar tag)
'event-log' 'black-box app' for lack of a better term, for eventual relase
to Zope.org, if only as a helper for _new_ newbies.

I'm stuck on what I guess is a pythonish thing and my brain hurts.

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)).

Or  one can embed a fcn call within an argument list in order to supply a
needed function parameter.

In my case here in Zope, sometimes I have to search a ZCatalog
prior to displaying the results in a <dtml-in> looping construct.



Now if the 'moderated' property is active I want to add the keyword arg


to the arg list at the time that the searchResults method is invoked.
Since this invokation is in an expression it's certainly a python thing, but I can't 
any reference to this type of capability in any reference I have.  Did I miss 
something or
is there just no simple way to do this?

The only way I can see to do it is to wrap Catalog.searchResults() in an external 
method with
some ifs and elifs.

Jeff Sasmor

Zope maillist  -  [EMAIL PROTECTED]
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-dev )

Reply via email to