Functions, parameters

Boris Ozegovic silovana.vjeverica at com.gmail
Thu Feb 8 14:03:32 EST 2007


Bruno Desthuilliers wrote:

> Why don't you just read the source code ? Django is free software, you 
> know !-)

Yes, I know.  :)  

> What about something like:
 
> def filter(self, **kw):
>    for argname, value in kw.items():
>      fieldname, op = argname.split('__', 1)

Yes, this is what confused me in the first place: how to separate
arguments.  If you call split, and split returns list of String, then you
have fieldname = 'question' and startwith = 'what', and not references at
question and startwith, or am I missing something big.  

-- 
http://www.nacional.hr/articles/view/23894/23



More information about the Python-list mailing list