[IronPython] A little bug about "in" operator

Timothy Fitz firemoth at gmail.com
Wed Oct 20 07:30:59 CEST 2004


While attempting to troubleshoot I noticed another error,
>>> t = (None,2,3)
>>> 's' in t
And out comes an error about NoneType not being itterable. I won't
have a chance to work on this again until thursday, anybody else
attempting to fix it?



On Mon, 18 Oct 2004 04:13:42 +0000, 谭 颖华 <fantasysoft at hotmail.com> wrote:
> Among three kinds of special data types in Python: Dictionary,List and
> Tuple, the operator "in" works well in Dict and List, but Tuple. Here is
> the sample code:
>
> >>> t = (1,2,3)
> >>> t
> (1,2,3)
> >>> 2 in t
> True           it's OK
> >>> 5 in t
> False          it' OK, too
>
> >>> 's' in t
> True           It's wrong here.
>
> And in CPython, the statement of  " 's' in t " produces the correct result:
> False.
>
> _________________________________________________________________
> 免费下载 MSN Explorer:   http://explorer.msn.com/lccn
>
> _______________________________________________
> users-ironpython.com mailing list
> users-ironpython.com at lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
>



More information about the Ironpython-users mailing list