[IronPython] A little bug about "in" operator
谭 颖华
fantasysoft at hotmail.com
Mon Oct 18 06:13:42 CEST 2004
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
More information about the Ironpython-users
mailing list