[IronPython] SyntaxError: yield in more than one try blocks
Sylvain Hellegouarch
sh at defuze.org
Thu May 10 12:40:24 CEST 2007
sylvain at 4[WebApp]$ mono bin/ipy.exe
IronPython 1.1 (1.1) on .NET 2.0.50727.42
def test():
try:
yield 1
except:
try:
yield 2
except:
pass
if __name__ == '__main__':
for _ in test():
print _
Will produce:
sylvain at 4[WebApp]$ mono bin/ipy.exe -X:Python25 testyield.py
Traceback (most recent call last):
SyntaxError: yield in more than one try blocks (testyield.py, line 6)
It does work fine with CPython 2.5
- Sylvain
More information about the Ironpython-users
mailing list