diff options
author | Fred Drake <fdrake@acm.org> | 2000-12-12 23:20:45 (GMT) |
---|---|---|
committer | Fred Drake <fdrake@acm.org> | 2000-12-12 23:20:45 (GMT) |
commit | 8152d32375c40bba9ccbe43b780ebe96d9617781 (patch) | |
tree | f10aba5ba6f1e3064b26d2edfd6fffb45378245d /Lib/uu.py | |
parent | c140131995c67b1cd001b5c27e0095c53b1204b4 (diff) | |
download | cpython-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-x | Lib/uu.py | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -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 |