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

Vizcayno Tamparantan vizcaynot at gmail.com
Mon Oct 15 23:11:44 CEST 2007


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 at lists.ironpython.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20071015/d8bb4c58/attachment.html>


More information about the Ironpython-users mailing list