[IronPython] Comparing clr objects in lists
Andrzej Krzywda
andrzej.krzywda at resolversystems.com
Tue Oct 3 14:35:06 CEST 2006
Hello all,
We found an issue with comparing clr objects in lists.
IronPython 1.0.60816 on .NET 2.0.50727.42
Copyright (c) Microsoft Corporation. All rights reserved.
>>> import clr
>>> clr.AddReference('System.Drawing')
>>> from System.Drawing import Color
>>>
>>> Color.Red == Color.Red
True
>>> (Color.Red) == (Color.Red)
True
>>> [Color.Red] == [Color.Red]
False
>>> [(Color.Red)] == [(Color.Red)]
False
The same kind of comparison will work with IronPython objects.
Andrzej Krzywda
More information about the Ironpython-users
mailing list