[New-bugs-announce] [issue14247] "in" operator doesn't return boolean

Damjan Košir report at bugs.python.org
Sat Mar 10 19:01:02 CET 2012


New submission from Damjan Košir <damjan.kosir at gmail.com>:

In operator acts like it doesn't return a boolean value

>>> 3 in [1,2,3] == True
False

and even

>>> 3 in [1,2,3] == 3 in [1,2,3]
False

but somehow if you add ( ) it starts working

>>> (3 in [1,2,3]) == True
True

Tested on OSX 10.7 Python 2.7.1

----------
components: None
messages: 155329
nosy: Damjan.Košir
priority: normal
severity: normal
status: open
title: "in" operator doesn't return boolean
versions: Python 2.7

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue14247>
_______________________________________


More information about the New-bugs-announce mailing list