On 31 Dec 2009, at 12:31 , Jani Tiainen wrote:
>
> Or to make things a bit more Pythonic:
>
> if request.get('q', False):
The `False` is pretty pointless in this case: .get returns None by default, and
None is falsy. Unless specifically testing with 'is False', the default
behavior works correctly.
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en.