<?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: Python drive-by</title>
	<atom:link href="http://darkness.codefu.org/wordpress/2007/09/14/286/feed" rel="self" type="application/rss+xml" />
	<link>http://darkness.codefu.org/wordpress/2007/09/14/286</link>
	<description></description>
	<pubDate>Thu, 04 Dec 2008 06:39:53 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.3</generator>
		<item>
		<title>By: Paddy3118</title>
		<link>http://darkness.codefu.org/wordpress/2007/09/14/286#comment-26587</link>
		<dc:creator>Paddy3118</dc:creator>
		<pubDate>Sat, 15 Sep 2007 06:23:15 +0000</pubDate>
		<guid isPermaLink="false">http://darkness.codefu.org/wordpress/2007/09/14/286#comment-26587</guid>
		<description>This is one of the cases where a class would be better for storing your complex data structure. You would have the option of not pre-computing and freezing fields that depend on other fields like your title field. It could be

  day.date = "this is based on %(date)"

And you could interpolate before fetching the value:

  return self.date % self.__dict__

A class would also give you a place to document your datastructure and allow you to add a method to check that it is well-formed.

- Paddy.</description>
		<content:encoded><![CDATA[<p>This is one of the cases where a class would be better for storing your complex data structure. You would have the option of not pre-computing and freezing fields that depend on other fields like your title field. It could be</p>
<p>  day.date = &#8220;this is based on %(date)&#8221;</p>
<p>And you could interpolate before fetching the value:</p>
<p>  return self.date % self.__dict__</p>
<p>A class would also give you a place to document your datastructure and allow you to add a method to check that it is well-formed.</p>
<p>- Paddy.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
