<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.3.3" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>
<channel>
	<title>Comments on: Indepth generator usage in Python (part2)</title>
	<link>http://loveandtheft.org/2008/08/30/indepth-generator-usage-in-python-part2/</link>
	<description>Mr Quinn, one word for your fans? "Ehm, astronaut."</description>
	<pubDate>Wed, 07 Jan 2009 08:15:47 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.3</generator>
		<item>
		<title>By: David Jones</title>
		<link>http://loveandtheft.org/2008/08/30/indepth-generator-usage-in-python-part2/#comment-2348</link>
		<dc:creator>David Jones</dc:creator>
		<pubDate>Sun, 04 Jan 2009 16:43:10 +0000</pubDate>
		<guid>http://loveandtheft.org/2008/08/30/indepth-generator-usage-in-python-part2/#comment-2348</guid>
		<description>Paddy is right.  "counter is 2" is a bug.  A dangerous sleeping bug.

See http://drj11.wordpress.com/2007/06/11/python-perils-of-«x-is-1»/

Nice article by the way.</description>
		<content:encoded><![CDATA[<p>Paddy is right.  &#8220;counter is 2&#8243; is a bug.  A dangerous sleeping bug.</p>
<p>See <a href="http://drj11.wordpress.com/2007/06/11/python-perils-of-" rel="nofollow">http://drj11.wordpress.com/2007/06/11/python-perils-of-</a>«x-is-1»/</p>
<p>Nice article by the way.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Recent Links Tagged With "exceptions" - JabberTags</title>
		<link>http://loveandtheft.org/2008/08/30/indepth-generator-usage-in-python-part2/#comment-581</link>
		<dc:creator>Recent Links Tagged With "exceptions" - JabberTags</dc:creator>
		<pubDate>Fri, 12 Sep 2008 00:19:14 +0000</pubDate>
		<guid>http://loveandtheft.org/2008/08/30/indepth-generator-usage-in-python-part2/#comment-581</guid>
		<description>[...] public links &#62;&#62; exceptions   Indepth generator usage in Python (part2) Saved by hedochen on Thu 11-9-2008   Palin Not a Non-Interventionist Saved by grugru on Sat [...]</description>
		<content:encoded><![CDATA[<p>[&#8230;] public links &gt;&gt; exceptions   Indepth generator usage in Python (part2) Saved by hedochen on Thu 11-9-2008   Palin Not a Non-Interventionist Saved by grugru on Sat [&#8230;]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paddy3118</title>
		<link>http://loveandtheft.org/2008/08/30/indepth-generator-usage-in-python-part2/#comment-563</link>
		<dc:creator>Paddy3118</dc:creator>
		<pubDate>Sat, 30 Aug 2008 20:10:01 +0000</pubDate>
		<guid>http://loveandtheft.org/2008/08/30/indepth-generator-usage-in-python-part2/#comment-563</guid>
		<description>You say:
  if counter is 2
In one of your examples instead of:
  if counter == 2
Although C-Python may well work with what you state I think it would be better to say the latter because , in general, 'is' cannot be used instead of '==' when comparing integers.

Try the following example:

&#62;&#62;&#62; x=2000
&#62;&#62;&#62; y = 123456 - 121456
&#62;&#62;&#62; x is y
False
&#62;&#62;&#62; x == y
True
&#62;&#62;&#62; x,y
(2000, 2000)
&#62;&#62;&#62; id(x),id(y)
(11789976, 12382812)
&#62;&#62;&#62; 


- Paddy.</description>
		<content:encoded><![CDATA[<p>You say:<br />
  if counter is 2<br />
In one of your examples instead of:<br />
  if counter == 2<br />
Although C-Python may well work with what you state I think it would be better to say the latter because , in general, &#8216;is&#8217; cannot be used instead of &#8216;==&#8217; when comparing integers.</p>
<p>Try the following example:</p>
<p>&gt;&gt;&gt; x=2000<br />
&gt;&gt;&gt; y = 123456 - 121456<br />
&gt;&gt;&gt; x is y<br />
False<br />
&gt;&gt;&gt; x == y<br />
True<br />
&gt;&gt;&gt; x,y<br />
(2000, 2000)<br />
&gt;&gt;&gt; id(x),id(y)<br />
(11789976, 12382812)<br />
&gt;&gt;&gt; </p>
<p>- Paddy.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Love and Theft &#187; Blog Archive &#187; Introduction to generators in Python</title>
		<link>http://loveandtheft.org/2008/08/30/indepth-generator-usage-in-python-part2/#comment-560</link>
		<dc:creator>Love and Theft &#187; Blog Archive &#187; Introduction to generators in Python</dc:creator>
		<pubDate>Sat, 30 Aug 2008 10:06:59 +0000</pubDate>
		<guid>http://loveandtheft.org/2008/08/30/indepth-generator-usage-in-python-part2/#comment-560</guid>
		<description>[...] Feed       &#171; New anti-spam commenting solution  Indepth generator usage in Python (part2) [...]</description>
		<content:encoded><![CDATA[<p>[&#8230;] Feed       &laquo; New anti-spam commenting solution  Indepth generator usage in Python (part2) [&#8230;]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
