<?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: Odd Old-Style vs. New-Style Class Behavior</title>
	<atom:link href="http://blog.dowski.com/2009/05/21/odd-old-style-vs-new-style-class-behavior/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.dowski.com/2009/05/21/odd-old-style-vs-new-style-class-behavior/</link>
	<description>Unfortunately, Christian had a Thwart, and the Magpie stayed in play.</description>
	<pubDate>Mon, 06 Sep 2010 11:51:07 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Matt Wilson</title>
		<link>http://blog.dowski.com/2009/05/21/odd-old-style-vs-new-style-class-behavior/comment-page-1/#comment-112128</link>
		<dc:creator>Matt Wilson</dc:creator>
		<pubDate>Fri, 22 May 2009 13:18:34 +0000</pubDate>
		<guid isPermaLink="false">http://blog.dowski.com/?p=279#comment-112128</guid>
		<description>There's a *lot* of old-style classes floating around, even in the standard library.  I don't understand the issue you're seeing here, but a while back I ran into a bunch of problems when I tried to use UserDict.  Since UserDict is an old-style class, my calls to super yielded some hilariously confusing error messages.</description>
		<content:encoded><![CDATA[<p>There&#8217;s a *lot* of old-style classes floating around, even in the standard library.  I don&#8217;t understand the issue you&#8217;re seeing here, but a while back I ran into a bunch of problems when I tried to use UserDict.  Since UserDict is an old-style class, my calls to super yielded some hilariously confusing error messages.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: christian</title>
		<link>http://blog.dowski.com/2009/05/21/odd-old-style-vs-new-style-class-behavior/comment-page-1/#comment-112127</link>
		<dc:creator>christian</dc:creator>
		<pubDate>Thu, 21 May 2009 21:29:04 +0000</pubDate>
		<guid isPermaLink="false">http://blog.dowski.com/?p=279#comment-112127</guid>
		<description>A great follow-up here: http://mg.pov.lt/blog/suprising-old-style-classes</description>
		<content:encoded><![CDATA[<p>A great follow-up here: <a href="http://mg.pov.lt/blog/suprising-old-style-classes" rel="nofollow">http://mg.pov.lt/blog/suprising-old-style-classes</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: christian</title>
		<link>http://blog.dowski.com/2009/05/21/odd-old-style-vs-new-style-class-behavior/comment-page-1/#comment-112126</link>
		<dc:creator>christian</dc:creator>
		<pubDate>Thu, 21 May 2009 21:10:15 +0000</pubDate>
		<guid isPermaLink="false">http://blog.dowski.com/?p=279#comment-112126</guid>
		<description>It's true, I do see differences, but I still can't explain them.  :-)  The &lt;code&gt;__getattr__&lt;/code&gt; method seems to be called on the old-style class for &lt;code&gt;__contains__&lt;/code&gt; and returns the &lt;code&gt;self._items&lt;/code&gt; dictionary's instance of it.  Meanwhile on the new-style class, &lt;code&gt;__getattr__&lt;/code&gt; is never called.</description>
		<content:encoded><![CDATA[<p>It&#8217;s true, I do see differences, but I still can&#8217;t explain them.  <img src='http://blog.dowski.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  The <code>__getattr__</code> method seems to be called on the old-style class for <code>__contains__</code> and returns the <code>self._items</code> dictionary&#8217;s instance of it.  Meanwhile on the new-style class, <code>__getattr__</code> is never called.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robert Brewer</title>
		<link>http://blog.dowski.com/2009/05/21/odd-old-style-vs-new-style-class-behavior/comment-page-1/#comment-112125</link>
		<dc:creator>Robert Brewer</dc:creator>
		<pubDate>Thu, 21 May 2009 20:19:49 +0000</pubDate>
		<guid isPermaLink="false">http://blog.dowski.com/?p=279#comment-112125</guid>
		<description>Change your getattr funcs to this:


    def __getattr__(self, attr):
        result = getattr(self._items, attr)
        print 'Retrieving attr %r = %r' % (attr, result)
        return result


...and you'll start to see the differences. ;)</description>
		<content:encoded><![CDATA[<p>Change your getattr funcs to this:</p>
<p>    def __getattr__(self, attr):<br />
        result = getattr(self._items, attr)<br />
        print &#8216;Retrieving attr %r = %r&#8217; % (attr, result)<br />
        return result</p>
<p>&#8230;and you&#8217;ll start to see the differences. <img src='http://blog.dowski.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
</channel>
</rss>
