changeset 8534:22ec9cf4d0ce

util: use "is" for True/False/None comparisons
author Martin Geisler <mg@lazybytes.net>
date Wed, 20 May 2009 10:50:23 +0200
parents 6062c6362b2e
children 5b6a6ed4f185
files mercurial/util.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/util.py	Wed May 20 21:16:04 2009 +0200
+++ b/mercurial/util.py	Wed May 20 10:50:23 2009 +0200
@@ -522,9 +522,9 @@
     exception.'''
     def py2shell(val):
         'convert python object into string that is useful to shell'
-        if val in (None, False):
+        if val is None or val is False:
             return '0'
-        if val == True:
+        if val is True:
             return '1'
         return str(val)
     oldenv = {}