[IronPython] in - operator got broken in transition from 0.9.5 to 0.9.6
J. de Hooge
info at geatec.com
Mon Dec 12 03:28:05 PST 2005
LS
Following code:
===============
aList = [['a']]
anItem = ['a']
print '1', anItem in aList
for item in aList:
if item == anItem:
print '2', True
break
else:
print '2', False
In IP 0.9.6 prints:
===================
2 False
2 True
In IP 0.9.5 prints:
===================
1 True
2 True
In Cpython 2.4 prints:
======================
1 True
2 True
Following Cpython 2.4 manual 1 and 2 should print the same thing:
=================================================================
[QUOTE]
For the list and tuple types, x in y is true if and only if there exists an
index i such that x == y[i] is true.
[UNQUOTE]
Kind regards
Jacques de Hooge
info at geatec.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/users-ironpython.com/attachments/20051212/bcb07713/attachment.html
More information about the users
mailing list