[Zope] testing for "REQUEST is not None"
Florent Guillaume
fg@nuxeo.com
Thu, 7 Nov 2002 17:18:37 +0000 (UTC)
Willem Broekema <willem@pastelhorn.com> wrote:
> If a method in a Zope product has REQUEST as optional parameter:
> def something(self, REQUEST=None):
>
> why is the REQUEST always compared with None:
> if REQUEST is not None:
> instead of just:
> if REQUEST:
1. it's more explicit (REQUEST is not a boolean)
2. it's faster
Florent
--
Florent Guillaume, Nuxeo (Paris, France)
+33 1 40 33 79 87 http://nuxeo.com mailto:fg@nuxeo.com