From: cloudaice Date: Thu, 16 May 2013 09:06:41 +0000 (+0200) Subject: comparison to None should be 'if cond is not None' X-Git-Tag: v3.1.0~74 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=91a2a059f791a00e11aa00d916cc90f432217cb2;p=thirdparty%2Ftornado.git comparison to None should be 'if cond is not None' --- diff --git a/tornado/options.py b/tornado/options.py index 8191946df..b65878028 100644 --- a/tornado/options.py +++ b/tornado/options.py @@ -360,11 +360,11 @@ class _Option(object): raise Error("Option %r is required to be a list of %s" % (self.name, self.type.__name__)) for item in value: - if item != None and not isinstance(item, self.type): + if item is not None and not isinstance(item, self.type): raise Error("Option %r is required to be a list of %s" % (self.name, self.type.__name__)) else: - if value != None and not isinstance(value, self.type): + if value is not None and not isinstance(value, self.type): raise Error("Option %r is required to be a %s (%s given)" % (self.name, self.type.__name__, type(value))) self._value = value