classification
Title: The expression '' in '' == '' is evaluated as True
Type: behavior Stage: resolved
Components: Versions: Python 3.7
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: eric.smith, kigawas
Priority: normal Keywords:

Created on 2019-10-16 08:39 by kigawas, last changed 2019-10-16 11:36 by eric.smith. This issue is now closed.

Messages (3)
msg354785 - (view) Author: Weiliang Li (kigawas) * Date: 2019-10-16 08:40
In [1]: '' in '' == ''                                                                                                
Out[1]: True

In [2]: 'a' in 'a' == 'a'                                                                                             
Out[2]: True
msg354787 - (view) Author: Weiliang Li (kigawas) * Date: 2019-10-16 08:51
https://docs.python.org/3/reference/expressions.html#comparisons
msg354797 - (view) Author: Eric V. Smith (eric.smith) * (Python committer) Date: 2019-10-16 11:36
For future reference:

Specifically, note that:
'' in '' == ''
is equivalent to:
('' in '') and ('' == '')
History
Date User Action Args
2019-10-16 11:36:14eric.smithsetresolution: works for me -> not a bug

messages: + msg354797
nosy: + eric.smith
2019-10-16 08:52:08kigawassetstatus: open -> closed
stage: resolved
2019-10-16 08:51:54kigawassetresolution: works for me
2019-10-16 08:51:44kigawassetmessages: + msg354787
2019-10-16 08:40:14kigawassetmessages: + msg354785
2019-10-16 08:39:12kigawascreate