[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnumed-devel] Re: tuples returned by run_ro_query

From: H.Berger
Subject: [Gnumed-devel] Re: tuples returned by run_ro_query
Date: Tue, 23 Sep 2003 13:47:36 +0200

> > My setup chokes when trying to squeeze the two-tuple returned from
> > run_ro_query into a single variable.
> Hm, funny. As I read the code it doesn't do such:
> res, = run_ro_query()
>    ^
> means "throw away the following tuple parts", no ?

"res," is a one-element tuple. The same as "res = tuple[0]". This tuple has a
fixed size, so it wont throw away the following parts.
IMHO in a case like this where we expect to get sometimes two elements, we
should actually take them:
res, idx = run_ro_query()


reply via email to

[Prev in Thread] Current Thread [Next in Thread]