<?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"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<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>
	<lastBuildDate>Tue, 08 Nov 2011 00:39:45 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.5</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/ &quot;print&quot; is not an expression in python, but an instruction (you can write &quot;print 42&quot; (or even &quot;print &gt;&gt; sys.stderr, 42&quot;), whom syntax clearly shows it&#039;s not an expression), so can&#039;t be included where an expression is expected =&gt; not a gotcha (in python 3000, &quot;print&quot; becomes a function (thus an expression too), and the &quot;print 42&quot; syntax is not valid then)
2/ python, like scheme or many well-designed languages, has lexical scoping, so &quot;base&quot; leaks in &quot;inc&quot; for reading, but python doesn&#039;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</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>

