thanks alot, even though I consider myself quite familiar with python I regularly discover things that I missed guess this is due to my learning by doing and not reading manuals properly :)
On Apr 15, 5:08 pm, Jonathan Lundell <[email protected]> wrote: > On Apr 15, 2010, at 3:05 AM, Mladen Milankovic wrote: > > > q = request.vars.get('q', None) > > > You can put anything instead of None. It's like a default value. > > Or just q = request.vars.get('q'), since None is the default. > > This is standard dictionary behavior in Python. It and setdefault are > particularly useful dict methods, and worth getting to know. -- Subscription settings: http://groups.google.com/group/web2py/subscribe?hl=en

