[Python-projects] astng: generator ignored GeneratorExit

Maarten ter Huurne maarten at treewalker.org
Mon May 12 12:52:31 CEST 2008


On Monday 12 May 2008, I wrote:

>                  # will be the same
>                  lhs.getattr(meth)
>                  yield lhs
> +            except GeneratorExit:
> +                raise
>              except:
>                  yield YES
>              continue

Hmmm, I just realized that this will not work on Python 2.4, since 
GeneratorExit does not exist there. So it will need some kind of workaround 
for that, like defining a dummy class named GeneratorExit if the Python 
version is below 2.5.

Bye,
		Maarten
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 194 bytes
Desc: This is a digitally signed message part.
Url : http://lists.logilab.org/pipermail/python-projects/attachments/20080512/92bdfbb0/attachment.pgp 


More information about the Python-Projects mailing list