<?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: Read-only attributes</title>
	<atom:link href="http://goldenspud.com/rotr/index.php/2007/11/02/read-only-attributes/feed/" rel="self" type="application/rss+xml" />
	<link>http://goldenspud.com/rotr/index.php/2007/11/02/read-only-attributes/</link>
	<description></description>
	<lastBuildDate>Thu, 27 May 2010 00:05:41 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: gldnspud</title>
		<link>http://goldenspud.com/rotr/index.php/2007/11/02/read-only-attributes/comment-page-1/#comment-5219</link>
		<dc:creator>gldnspud</dc:creator>
		<pubDate>Sun, 18 Nov 2007 02:59:35 +0000</pubDate>
		<guid isPermaLink="false">http://goldenspud.com/rotr/index.php/2007/11/02/read-only-attributes/#comment-5219</guid>
		<description>@Frank, @Wyatt: Mostly because I&#039;ve been trained, from the people and code I&#039;ve worked with, to avoid lambdas 99% of the time, giving preference to named function definitions.  So, what I used to use was:

&lt;pre&gt;
@property
def abc(self):
    return self._abc
&lt;/pre&gt;

Using attrgetter makes it easy to turn that into a one-liner, without having to use lambda :)  Plus, as Alexander points out, the name &quot;attrgetter&quot; certainly tells you pretty directly what&#039;s going on.</description>
		<content:encoded><![CDATA[<p>@Frank, @Wyatt: Mostly because I&#8217;ve been trained, from the people and code I&#8217;ve worked with, to avoid lambdas 99% of the time, giving preference to named function definitions.  So, what I used to use was:</p>
<pre>
@property
def abc(self):
    return self._abc
</pre>
<p>Using attrgetter makes it easy to turn that into a one-liner, without having to use lambda :)  Plus, as Alexander points out, the name &#8220;attrgetter&#8221; certainly tells you pretty directly what&#8217;s going on.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Wyatt</title>
		<link>http://goldenspud.com/rotr/index.php/2007/11/02/read-only-attributes/comment-page-1/#comment-5043</link>
		<dc:creator>Wyatt</dc:creator>
		<pubDate>Sat, 10 Nov 2007 18:55:45 +0000</pubDate>
		<guid isPermaLink="false">http://goldenspud.com/rotr/index.php/2007/11/02/read-only-attributes/#comment-5043</guid>
		<description>Just for fun, how about this:

uri = property(lambda self: self._uri)</description>
		<content:encoded><![CDATA[<p>Just for fun, how about this:</p>
<p>uri = property(lambda self: self._uri)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Frank Benkstein</title>
		<link>http://goldenspud.com/rotr/index.php/2007/11/02/read-only-attributes/comment-page-1/#comment-4884</link>
		<dc:creator>Frank Benkstein</dc:creator>
		<pubDate>Sat, 03 Nov 2007 07:24:44 +0000</pubDate>
		<guid isPermaLink="false">http://goldenspud.com/rotr/index.php/2007/11/02/read-only-attributes/#comment-4884</guid>
		<description>Why not simply use property(lambda self: self._uri)?</description>
		<content:encoded><![CDATA[<p>Why not simply use property(lambda self: self._uri)?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alexander Botero-Lowry</title>
		<link>http://goldenspud.com/rotr/index.php/2007/11/02/read-only-attributes/comment-page-1/#comment-4881</link>
		<dc:creator>Alexander Botero-Lowry</dc:creator>
		<pubDate>Sat, 03 Nov 2007 01:08:16 +0000</pubDate>
		<guid isPermaLink="false">http://goldenspud.com/rotr/index.php/2007/11/02/read-only-attributes/#comment-4881</guid>
		<description>Very neat! I&#039;ve always done:

uri = property(lambda x: x._url)

which though terse isn&#039;t as clear as attrgetter!</description>
		<content:encoded><![CDATA[<p>Very neat! I&#8217;ve always done:</p>
<p>uri = property(lambda x: x._url)</p>
<p>which though terse isn&#8217;t as clear as attrgetter!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Roberto</title>
		<link>http://goldenspud.com/rotr/index.php/2007/11/02/read-only-attributes/comment-page-1/#comment-4878</link>
		<dc:creator>Roberto</dc:creator>
		<pubDate>Fri, 02 Nov 2007 22:12:41 +0000</pubDate>
		<guid isPermaLink="false">http://goldenspud.com/rotr/index.php/2007/11/02/read-only-attributes/#comment-4878</guid>
		<description>Beautiful! :)</description>
		<content:encoded><![CDATA[<p>Beautiful! :)</p>
]]></content:encoded>
	</item>
</channel>
</rss>
