mirror of
https://github.com/python/cpython.git
synced 2025-08-22 09:45:06 +00:00
Move itertools izip() code to builtins as zip(). Complete the renaming.
This commit is contained in:
parent
c5a2eb949c
commit
736c0ab428
11 changed files with 281 additions and 476 deletions
|
@ -12,7 +12,7 @@ Functions:
|
|||
import os
|
||||
import stat
|
||||
import warnings
|
||||
from itertools import filterfalse, izip
|
||||
from itertools import filterfalse
|
||||
|
||||
__all__ = ["cmp","dircmp","cmpfiles"]
|
||||
|
||||
|
@ -130,8 +130,8 @@ class dircmp:
|
|||
self.right_list.sort()
|
||||
|
||||
def phase1(self): # Compute common names
|
||||
a = dict(izip(map(os.path.normcase, self.left_list), self.left_list))
|
||||
b = dict(izip(map(os.path.normcase, self.right_list), self.right_list))
|
||||
a = dict(zip(map(os.path.normcase, self.left_list), self.left_list))
|
||||
b = dict(zip(map(os.path.normcase, self.right_list), self.right_list))
|
||||
self.common = list(map(a.__getitem__, filter(b.__contains__, a)))
|
||||
self.left_only = list(map(a.__getitem__, filterfalse(b.__contains__, a)))
|
||||
self.right_only = list(map(b.__getitem__, filterfalse(a.__contains__, b)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue