[IronPython] Can anybody reproduce this issue under ipy 2.0 a5 (expr if cond else expr)?

Dave Fugate dfugate at microsoft.com
Mon Oct 15 23:43:42 CEST 2007


Thanks for reporting this!  I've filed the bug report here - http://www.codeplex.com/IronPython/WorkItem/View.aspx?WorkItemId=13320.

Dave

From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Vizcayno Tamparantan
Sent: Monday, October 15, 2007 2:12 PM
To: users at lists.ironpython.com
Subject: [IronPython] Can anybody reproduce this issue under ipy 2.0 a5 (expr if cond else expr)?

For ipy 2.0 alpha 5, try this:
h = 'hello'
b = 'bye'
print h if h=='hello' else b
print h if h=="hello" else "bye"

Results are:
>>> h = 'hello'
>>> b = 'bye'
>>> print h if h=='hello' else b
hello
>>> print h if h=="hello" else "bye"
Traceback (most recent call last):
ValueError: Types must match
Parameter name: ifTrue

In Cpython 2.5 and ipy 2.0 a4 I don't have this problem.
Regards.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20071015/6c0d6ce9/attachment.html>


More information about the Ironpython-users mailing list