mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
compare singletons by identity not equality (closes #16712)
Patch from Serhiy Storchaka.
This commit is contained in:
parent
a511935151
commit
b29614e047
9 changed files with 15 additions and 15 deletions
|
@ -736,7 +736,7 @@ class TestCase(object):
|
|||
msg: Optional message to use on failure instead of a list of
|
||||
differences.
|
||||
"""
|
||||
if seq_type != None:
|
||||
if seq_type is not None:
|
||||
seq_type_name = seq_type.__name__
|
||||
if not isinstance(seq1, seq_type):
|
||||
raise self.failureException('First sequence is not a %s: %s'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue