[IronPython] SyntaxError: yield in more than one try blocks
Sylvain Hellegouarch
sh at defuze.org
Thu May 10 19:30:59 CEST 2007
I assume you are looking at a solution in the future :)
Martin Maly wrote:
> Yes, this is currently a an unfortunate limitation of our compiler.
>
> Martin
>
> -----Original Message-----
> From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Sylvain Hellegouarch
> Sent: Thursday, May 10, 2007 3:40 AM
> To: Discussion of IronPython
> Subject: [IronPython] SyntaxError: yield in more than one try blocks
>
> 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
> _______________________________________________
> users mailing list
> users at lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
> _______________________________________________
> users mailing list
> users at lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
More information about the Ironpython-users
mailing list