I come from a PHP background and would like to know if there\'s a way to do this in Python.
In PHP you can kill 2 birds with one stone like this:
Instead of
If get() throws an exception when it's not there, you could do
try: q = request.GET.get('q') print q except : pass