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

Dave

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Vizcayno 
Tamparantan
Sent: Monday, October 15, 2007 2:12 PM
To: [email protected]
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.
_______________________________________________
Users mailing list
[email protected]
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

Reply via email to