Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Apr 28th, 2012  |  syntax: None  |  size: 0.27 KB  |  hits: 11  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Python .get() does not evaluate to True even though there is an object?
  2. if request.params.get('logo'):
  3.     do x
  4.        
  5. if not request.params.get('logo') == None:
  6.     do x
  7.        
  8. if request.params.get('logo') is not None:
  9.     # do x
  10.        
  11. if 'logo' in request.params:
  12.     do x