Re: first of not None
On 10/9/08, Serge Matveenko <[EMAIL PROTECTED]> wrote: > I need to put in the var property of the first object from the list > that is not None. Somth like: > > foo = first_of([any, beny, riki,]).name > > Dont want to ugly if-cascade: > > foo = any.name if name is n
first of not None
not None \ else riki.name if riki is not None -- Serge Matveenko mailto:[EMAIL PROTECTED] http://serge.matveenko.ru/ -- http://mail.python.org/mailman/listinfo/python-list