Hi, Reference to the IRC discussion (just done), I am happy about this change.
from the discussion the search clauses will look like:
['AND', ('name', '=', 'foo'), ['OR', ('amount', '>', 100), ('state', '=',
'paid')]]
and you could use any iterable as container for this.
This strongly goes with the zen of python too:
"
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
"
Thanks,
Sharoon
On 12 Aug 2010, at 18:25, Cédric Krier wrote:
> Hi,
>
> With the results show by Sharoon about namedtuple, I thought about an other
> change which is to force to put the logical operator on each set of argument
> instead of having implicit 'AND'.
>
> So where are the advantages?
>
> - we have at some place tests to differentiate between list and tuple to know
> if we have an operand or a clause. These tests are not very flexible nor
> pythonic.
> - we could use in many place tuple instead of list which is better for
> performance.
> - we could make search as generic as possible to allow to use any iterable
> like Set.
> - it will remove the difference between clauses from netrpc and
> xml-rpc/json-rpc.
>
> --
> Cédric Krier
>
> B2CK SPRL
> Rue de Rotterdam, 4
> 4000 Liège
> Belgium
> Tel: +32 472 54 46 59
> Email/Jabber: [email protected]
> Website: http://www.b2ck.com/
PGP.sig
Description: This is a digitally signed message part
