<?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: Duck typing and Python</title>
	<atom:link href="http://www.remyroy.com/2008/06/01/duck-typing-and-python/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.remyroy.com/2008/06/01/duck-typing-and-python/</link>
	<description>software development, technology, science and philosophy by Rémy Roy</description>
	<pubDate>Sun, 05 Feb 2012 06:43:54 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6</generator>
		<item>
		<title>By: yjcqdqelo</title>
		<link>http://www.remyroy.com/2008/06/01/duck-typing-and-python/#comment-37640</link>
		<dc:creator>yjcqdqelo</dc:creator>
		<pubDate>Fri, 22 Jul 2011 11:57:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.remyroy.com/2008/06/01/duck-typing-and-python/#comment-37640</guid>
		<description>mamfsn  &lt;a href="http://dgtepvqnqjnb.com/" rel="nofollow"&gt;dgtepvqnqjnb&lt;/a&gt;</description>
		<content:encoded><![CDATA[<p>mamfsn  <a href="http://dgtepvqnqjnb.com/" rel="nofollow">dgtepvqnqjnb</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: lygxwd</title>
		<link>http://www.remyroy.com/2008/06/01/duck-typing-and-python/#comment-37514</link>
		<dc:creator>lygxwd</dc:creator>
		<pubDate>Wed, 20 Jul 2011 13:26:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.remyroy.com/2008/06/01/duck-typing-and-python/#comment-37514</guid>
		<description>gCy3t5  &lt;a href="http://xvxeirwehfnl.com/" rel="nofollow"&gt;xvxeirwehfnl&lt;/a&gt;</description>
		<content:encoded><![CDATA[<p>gCy3t5  <a href="http://xvxeirwehfnl.com/" rel="nofollow">xvxeirwehfnl</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris</title>
		<link>http://www.remyroy.com/2008/06/01/duck-typing-and-python/#comment-37460</link>
		<dc:creator>Chris</dc:creator>
		<pubDate>Tue, 19 Jul 2011 17:14:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.remyroy.com/2008/06/01/duck-typing-and-python/#comment-37460</guid>
		<description>Slam dunkin like Shaquille O'Neal, if he wrote inforamtvie articles.</description>
		<content:encoded><![CDATA[<p>Slam dunkin like Shaquille O&#8217;Neal, if he wrote inforamtvie articles.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tamela</title>
		<link>http://www.remyroy.com/2008/06/01/duck-typing-and-python/#comment-35043</link>
		<dc:creator>Tamela</dc:creator>
		<pubDate>Tue, 15 Mar 2011 04:35:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.remyroy.com/2008/06/01/duck-typing-and-python/#comment-35043</guid>
		<description>To Remy
Oh OK. Will you please remove my comments with my address. Thank you. Sorry for the confusion. I appreciate that you took the image down. Thanks again.
Tamela</description>
		<content:encoded><![CDATA[<p>To Remy<br />
Oh OK. Will you please remove my comments with my address. Thank you. Sorry for the confusion. I appreciate that you took the image down. Thanks again.<br />
Tamela</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rémy Roy</title>
		<link>http://www.remyroy.com/2008/06/01/duck-typing-and-python/#comment-34997</link>
		<dc:creator>Rémy Roy</dc:creator>
		<pubDate>Sat, 12 Mar 2011 15:38:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.remyroy.com/2008/06/01/duck-typing-and-python/#comment-34997</guid>
		<description>Hello Tamela,

I have a deep respect for artists and creators like you. I wrongly assumed that your picture was licensed under a creative commons license because someone else uploaded it with that license on flickr.</description>
		<content:encoded><![CDATA[<p>Hello Tamela,</p>
<p>I have a deep respect for artists and creators like you. I wrongly assumed that your picture was licensed under a creative commons license because someone else uploaded it with that license on flickr.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rémy Roy</title>
		<link>http://www.remyroy.com/2008/06/01/duck-typing-and-python/#comment-11083</link>
		<dc:creator>Rémy Roy</dc:creator>
		<pubDate>Sun, 15 Mar 2009 20:42:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.remyroy.com/2008/06/01/duck-typing-and-python/#comment-11083</guid>
		<description>Hello Carla,

A good example of this would be the file like objects used in Python. In various modules, you can use file like objects for different input/ouput operations.

For instance, take the pickle module: http://docs.python.org/library/pickle.html . It provides object de/serialization. It requires a file object for loading or dumping object. If you were to use an old tape component where there is no built in mechanism to access it, you could create a Tapefile class simply by specifying the few methods required by pickle. It could look like this:

class Tapefile():
    "A tape file"
    def __init__(self,params):
        #various initialization for tape access
        pass
    def read(len):
        #use special methods to access tape
        pass
    def readline():
        #use special methods to read a whole line on tape
        pass
    def write(value):
        #use special methods to write on tape
        pass

You could than pass a Tapefile object to the pickle module and it would simply work. The pickle module do not care if it has a file object or another object pretending to act like a file. As long as it has the right methods, it will work.</description>
		<content:encoded><![CDATA[<p>Hello Carla,</p>
<p>A good example of this would be the file like objects used in Python. In various modules, you can use file like objects for different input/ouput operations.</p>
<p>For instance, take the pickle module: <a href="http://docs.python.org/library/pickle.html" rel="nofollow">http://docs.python.org/library/pickle.html</a> . It provides object de/serialization. It requires a file object for loading or dumping object. If you were to use an old tape component where there is no built in mechanism to access it, you could create a Tapefile class simply by specifying the few methods required by pickle. It could look like this:</p>
<p>class Tapefile():<br />
    &#8220;A tape file&#8221;<br />
    def __init__(self,params):<br />
        #various initialization for tape access<br />
        pass<br />
    def read(len):<br />
        #use special methods to access tape<br />
        pass<br />
    def readline():<br />
        #use special methods to read a whole line on tape<br />
        pass<br />
    def write(value):<br />
        #use special methods to write on tape<br />
        pass</p>
<p>You could than pass a Tapefile object to the pickle module and it would simply work. The pickle module do not care if it has a file object or another object pretending to act like a file. As long as it has the right methods, it will work.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Carla</title>
		<link>http://www.remyroy.com/2008/06/01/duck-typing-and-python/#comment-10958</link>
		<dc:creator>Carla</dc:creator>
		<pubDate>Tue, 10 Mar 2009 05:47:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.remyroy.com/2008/06/01/duck-typing-and-python/#comment-10958</guid>
		<description>is it possible you could display an example of duck typing with python...</description>
		<content:encoded><![CDATA[<p>is it possible you could display an example of duck typing with python&#8230;</p>
]]></content:encoded>
	</item>
</channel>
</rss>

