mirror of
https://github.com/python/cpython.git
synced 2025-12-11 11:31:05 +00:00
Revert "bpo-37555: cleaning up changes unnecessary to the final product"
This reverts commit 18e964ba01.
This commit is contained in:
parent
f4844c7a7f
commit
84489c8489
1 changed files with 7 additions and 1 deletions
|
|
@ -337,13 +337,19 @@ class _CallList(list):
|
||||||
|
|
||||||
for i in range(0, len_self - len_value + 1):
|
for i in range(0, len_self - len_value + 1):
|
||||||
sub_list = self[i:i+len_value]
|
sub_list = self[i:i+len_value]
|
||||||
if sub_list == value:
|
if value == sub_list:
|
||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
return pprint.pformat(list(self))
|
return pprint.pformat(list(self))
|
||||||
|
|
||||||
|
def __eq__(self, other):
|
||||||
|
self_list = list(self)
|
||||||
|
other_list = list(other)
|
||||||
|
# checking equality both directions is necessary for ANY to work
|
||||||
|
return self_list == other_list or other_list == self_list
|
||||||
|
|
||||||
|
|
||||||
def _check_and_set_parent(parent, value, name, new_name):
|
def _check_and_set_parent(parent, value, name, new_name):
|
||||||
# function passed to create_autospec will have mock
|
# function passed to create_autospec will have mock
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue