<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to 323: Exception using "as" fails</title><link>https://sourceforge.net/p/pychecker/bugs/323/</link><description>Recent changes to 323: Exception using "as" fails</description><atom:link href="https://sourceforge.net/p/pychecker/bugs/323/feed.rss" rel="self"/><language>en</language><lastBuildDate>Wed, 13 Feb 2013 20:24:04 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/pychecker/bugs/323/feed.rss" rel="self" type="application/rss+xml"/><item><title>Exception using "as" fails</title><link>https://sourceforge.net/p/pychecker/bugs/323/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;I have some relatively simple code that is even 'referenced in the 2.7' site:&lt;br /&gt;
try:&lt;br /&gt;
# Execute the SQL command&lt;br /&gt;
cur.execute(query)&lt;br /&gt;
# Fetch all the rows in a list of lists.&lt;br /&gt;
con.commit()&lt;br /&gt;
result = cur.fetchall()&lt;br /&gt;
except Exception as e:&lt;br /&gt;
con.rollback()&lt;br /&gt;
print("Error: unable to fecth data: {0}".format(e.strerror))&lt;/p&gt;
&lt;p&gt;Using "as" is referenced here:&lt;br /&gt;
&lt;a href="http://docs.python.org/2/tutorial/errors.html" rel="nofollow"&gt;http://docs.python.org/2/tutorial/errors.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;pychecker fails this check with:&lt;/p&gt;
&lt;p&gt;Processing module capture (capture.py)...&lt;br /&gt;
SyntaxError: invalid syntax (capture.py, line 78)&lt;br /&gt;
except Exception as e:&lt;br /&gt;
^&lt;/p&gt;
&lt;p&gt;Warnings...&lt;/p&gt;
&lt;p&gt;capture:1: NOT PROCESSED UNABLE TO IMPORT&lt;br /&gt;
[kpeters@localhost dbcontrol]$ /usr/local/bin/pychecker capture.py&lt;br /&gt;
Processing module capture (capture.py)...&lt;br /&gt;
SyntaxError: invalid syntax (capture.py, line 78)&lt;br /&gt;
except Exception as e:&lt;br /&gt;
^&lt;/p&gt;
&lt;p&gt;Warnings...&lt;/p&gt;
&lt;p&gt;capture:1: NOT PROCESSED UNABLE TO IMPORT&lt;/p&gt;
&lt;p&gt;This cannot be right.  Is this a bug?&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Kurt</dc:creator><pubDate>Wed, 13 Feb 2013 20:24:04 -0000</pubDate><guid>https://sourceforge.net8b7a1f12d367b906002b9dda51d92def49f80102</guid></item></channel></rss>