[Python-projects] astng crashes on yield expression
Huurne, Maarten ter
maarten.ter.huurne at philips.com
Thu Mar 26 19:16:14 CET 2009
Hi,
I found a false positive caused by "yield" not being considered a statement:
===
def f(seq):
for val in seq:
pass
for val in seq:
yield val
===
W0631: 5:f: Using possibly undefined loop variable 'val'
If I revert the change I made to astng, the warning goes away. Also, if I replace "yield" by "print", the warning goes away.
Bye,
Maarten
________________________________
The information contained in this message may be confidential and legally protected under applicable law. The message is intended solely for the addressee(s). If you are not the intended recipient, you are hereby notified that any use, forwarding, dissemination, or reproduction of this message is strictly prohibited and may be unlawful. If you are not the intended recipient, please contact the sender by return e-mail and destroy all copies of the original message.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.logilab.org/pipermail/python-projects/attachments/20090326/58f90572/attachment.htm>
More information about the Python-Projects
mailing list