<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: Python Gotchas</title>
	<atom:link href="http://blog.cons.org.nz/2006/09/04/python-gotchas/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.cons.org.nz/2006/09/04/python-gotchas/</link>
	<description>(cons web log)</description>
	<pubDate>Thu, 09 Sep 2010 04:38:42 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
		<item>
		<title>By: anon</title>
		<link>http://blog.cons.org.nz/2006/09/04/python-gotchas/#comment-18892</link>
		<dc:creator>anon</dc:creator>
		<pubDate>Mon, 11 Aug 2008 11:05:49 +0000</pubDate>
		<guid isPermaLink="false">http://blog.cons.org.nz/?p=22#comment-18892</guid>
		<description>1/ "print" is not an expression in python, but an instruction (you can write "print 42" (or even "print &#62;&#62; sys.stderr, 42"), whom syntax clearly shows it's not an expression), so can't be included where an expression is expected =&#62; not a gotcha (in python 3000, "print" becomes a function (thus an expression too), and the "print 42" syntax is not valid then)
2/ python, like scheme or many well-designed languages, has lexical scoping, so "base" leaks in "inc" for reading, but python doesn't like mixing scopes for a same name ; you read the more external scope OR you write it in local scope, and then it refers only to local scope =&#62; semi-gotcha</description>
		<content:encoded><![CDATA[<p>1/ &#8220;print&#8221; is not an expression in python, but an instruction (you can write &#8220;print 42&#8243; (or even &#8220;print &gt;&gt; sys.stderr, 42&#8243;), whom syntax clearly shows it&#8217;s not an expression), so can&#8217;t be included where an expression is expected =&gt; not a gotcha (in python 3000, &#8220;print&#8221; becomes a function (thus an expression too), and the &#8220;print 42&#8243; syntax is not valid then)<br />
2/ python, like scheme or many well-designed languages, has lexical scoping, so &#8220;base&#8221; leaks in &#8220;inc&#8221; for reading, but python doesn&#8217;t like mixing scopes for a same name ; you read the more external scope OR you write it in local scope, and then it refers only to local scope =&gt; semi-gotcha</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: lorne</title>
		<link>http://blog.cons.org.nz/2006/09/04/python-gotchas/#comment-4232</link>
		<dc:creator>lorne</dc:creator>
		<pubDate>Mon, 04 Sep 2006 09:23:44 +0000</pubDate>
		<guid isPermaLink="false">http://blog.cons.org.nz/?p=22#comment-4232</guid>
		<description>Fixed, thank you.</description>
		<content:encoded><![CDATA[<p>Fixed, thank you.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: qwandor</title>
		<link>http://blog.cons.org.nz/2006/09/04/python-gotchas/#comment-4231</link>
		<dc:creator>qwandor</dc:creator>
		<pubDate>Mon, 04 Sep 2006 09:20:13 +0000</pubDate>
		<guid isPermaLink="false">http://blog.cons.org.nz/?p=22#comment-4231</guid>
		<description>There is a typo in your links to the COMP312 and COMP304 pages.</description>
		<content:encoded><![CDATA[<p>There is a typo in your links to the COMP312 and COMP304 pages.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
