mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Issue #24857: Comparing call_args to a long sequence now correctly returns a
boolean result instead of raising an exception. Patch by A Kaptur.
This commit is contained in:
parent
d1a98587fe
commit
3fc536f1c9
3 changed files with 9 additions and 2 deletions
|
@ -1986,8 +1986,7 @@ class _Call(tuple):
|
|||
else:
|
||||
other_args = ()
|
||||
other_kwargs = value
|
||||
else:
|
||||
# len 2
|
||||
elif len_other == 2:
|
||||
# could be (name, args) or (name, kwargs) or (args, kwargs)
|
||||
first, second = other
|
||||
if isinstance(first, str):
|
||||
|
@ -1998,6 +1997,8 @@ class _Call(tuple):
|
|||
other_args, other_kwargs = (), second
|
||||
else:
|
||||
other_args, other_kwargs = first, second
|
||||
else:
|
||||
return False
|
||||
|
||||
if self_name and other_name != self_name:
|
||||
return False
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue