diff options
author | Raymond Hettinger <python@rcn.com> | 2008-01-30 02:55:10 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2008-01-30 02:55:10 (GMT) |
commit | d4cb56d4e88c7e001bbaba2c80953db47632f199 (patch) | |
tree | 73c95e0223ed8a98fac797fc99ab1bffae9c5457 /Lib/tarfile.py | |
parent | fd66e51c4c1ff9293b0f332d6ebc8093b2ef12bb (diff) | |
download | cpython-d4cb56d4e88c7e001bbaba2c80953db47632f199.zip cpython-d4cb56d4e88c7e001bbaba2c80953db47632f199.tar.gz cpython-d4cb56d4e88c7e001bbaba2c80953db47632f199.tar.bz2 |
Convert some custom sort comparison functions to equivalent key functions.
Diffstat (limited to 'Lib/tarfile.py')
-rw-r--r-- | Lib/tarfile.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/tarfile.py b/Lib/tarfile.py index 9ea92d0..b184ed8 100644 --- a/Lib/tarfile.py +++ b/Lib/tarfile.py @@ -2016,7 +2016,7 @@ class TarFile(object): self.extract(tarinfo, path) # Reverse sort directories. - directories.sort(lambda a, b: cmp(a.name, b.name)) + directories.sort(key=lambda a: a.name) directories.reverse() # Set correct owner, mtime and filemode on directories. |