"Phillip J. Eby" a écrit :
> Try:
> data=(self.which_one and [self.second_data] or [self.first_data])[0]
wow. what a *clever* idea to use [] around self.???_data. I used to
write:
data=self.which_one and self.second_data or self.first_data
but this failed because sometimes self.second_data is a
At 07:11 PM 7/13/00 +0400, Ava wrote:
>
>first generic attribute provider:
>fromexpr = '(self.id[0] and sql_get_first(key=id[0]) or [NOT_FOUND])[0]'
>attrsexprs = ['first_data=RESULT.data']
>
>second generic attribute provider:
>fromexpr = 'self.id[1] and sql_get_first(key=id[1]) or [N