summaryrefslogtreecommitdiffstats
path: root/Lib/uu.py
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2000-12-12 23:20:45 (GMT)
committerFred Drake <fdrake@acm.org>2000-12-12 23:20:45 (GMT)
commit8152d32375c40bba9ccbe43b780ebe96d9617781 (patch)
treef10aba5ba6f1e3064b26d2edfd6fffb45378245d /Lib/uu.py
parentc140131995c67b1cd001b5c27e0095c53b1204b4 (diff)
downloadcpython-8152d32375c40bba9ccbe43b780ebe96d9617781.zip
cpython-8152d32375c40bba9ccbe43b780ebe96d9617781.tar.gz
cpython-8152d32375c40bba9ccbe43b780ebe96d9617781.tar.bz2
Update the code to better reflect recommended style:
Use != instead of <> since <> is documented as "obsolescent". Use "is" and "is not" when comparing with None or type objects.
Diffstat (limited to 'Lib/uu.py')
-rwxr-xr-xLib/uu.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/Lib/uu.py b/Lib/uu.py
index e39b61b..3856d69 100755
--- a/Lib/uu.py
+++ b/Lib/uu.py
@@ -46,9 +46,9 @@ def encode(in_file, out_file, name=None, mode=None):
if in_file == '-':
in_file = sys.stdin
elif type(in_file) == type(''):
- if name == None:
+ if name is None:
name = os.path.basename(in_file)
- if mode == None:
+ if mode is None:
try:
mode = os.stat(in_file)[0]
except AttributeError:
@@ -64,9 +64,9 @@ def encode(in_file, out_file, name=None, mode=None):
#
# Set defaults for name and mode
#
- if name == None:
+ if name is None:
name = '-'
- if mode == None:
+ if mode is None:
mode = 0666
#
# Write the data
@@ -104,9 +104,9 @@ def decode(in_file, out_file=None, mode=None):
break
except ValueError:
pass
- if out_file == None:
+ if out_file is None:
out_file = hdrfields[2]
- if mode == None:
+ if mode is None:
mode = string.atoi(hdrfields[1], 8)
#
# Open the output file