Re: [pygccxml-development] need help with query
Brought to you by:
mbaas,
roman_yakovenko
From: Matthias B. <ba...@ir...> - 2006-03-15 09:27:39
|
Roman Yakovenko wrote: > I saw Matthias filters ( Or, Not and And ) and liked the idea. But ( > there is always some 'but' :-( ). > > I don't think they are useful in the form like this. People are to > lazy to learn. So instead > of composing queries using Matthias classes, they will right small > lambda function that will > do the job. May be I wrong, may be not. I propose an other > implementation. Take a look on attached file. Right now it does not > work. This is the area I need help. Can you see what I am doing wrong? > > Lets say I have query class, that has __call__ method, that takes 1 > argument - some text > > qa = query_t( 'a' ) #returns true if 'a' in text > qb = query_t( 'b' ) #returns true if 'b' in text > > qab = qa and qb > [...] > qaqb = qa or qb The above lines should read: qab = qa & qb ... qaqb = qa | qb "and", "or" is not the same as the &,| operators. > Do you like such approach? Matthias what do you think? I don't understand what problem you want to solve. Your query class just does the same than my filters, but above you say that this is too difficult to learn...? So in what respect is query_t easier to use than my filters? - Matthias - |