<?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: Now I have a reason to use staticmethod</title>
	<atom:link href="http://blog.tplus1.com/index.php/2008/08/31/now-i-have-a-reason-to-use-staticmethod/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.tplus1.com/index.php/2008/08/31/now-i-have-a-reason-to-use-staticmethod/</link>
	<description>Programming, gardening, economics, life in Cleveland Heights</description>
	<lastBuildDate>Sat, 04 Feb 2012 03:03:50 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Generic Viagra</title>
		<link>http://blog.tplus1.com/index.php/2008/08/31/now-i-have-a-reason-to-use-staticmethod/comment-page-1/#comment-11689</link>
		<dc:creator>Generic Viagra</dc:creator>
		<pubDate>Thu, 30 Jun 2011 10:14:41 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tplus1.com/?p=212#comment-11689</guid>
		<description>I staticmethod shows that the method has no side effects (you can change, even if it is not accepted). Using the substitution method is interesting, but I always find that these things are not obvious, when I go back to the code in six months. I can imagine some situations in the test phase, where it would be very useful, though.&lt;br&gt;&lt;a href=&quot;http://www.kamagra-world.co.uk/&quot; rel=&quot;nofollow&quot;&gt;&lt;b&gt;Kamagra&lt;/b&gt;&lt;/a&gt;&lt;br&gt;&lt;a href=&quot;http://www.kamagra-site.co.uk/&quot; rel=&quot;nofollow&quot;&gt;&lt;b&gt;Kamagra&lt;/b&gt;&lt;/a&gt;</description>
		<content:encoded><![CDATA[<p>I staticmethod shows that the method has no side effects (you can change, even if it is not accepted). Using the substitution method is interesting, but I always find that these things are not obvious, when I go back to the code in six months. I can imagine some situations in the test phase, where it would be very useful, though.<br /><a href="http://www.kamagra-world.co.uk/" rel="nofollow"><b>Kamagra</b></a><br /><a href="http://www.kamagra-site.co.uk/" rel="nofollow"><b>Kamagra</b></a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: PaulHildebrandt</title>
		<link>http://blog.tplus1.com/index.php/2008/08/31/now-i-have-a-reason-to-use-staticmethod/comment-page-1/#comment-3387</link>
		<dc:creator>PaulHildebrandt</dc:creator>
		<pubDate>Wed, 03 Sep 2008 10:24:22 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tplus1.com/?p=212#comment-3387</guid>
		<description>Nice post.  I was wondering about some good uses for staticmethod. &lt;br&gt;&lt;br&gt;Thanks,&lt;br&gt;Paul</description>
		<content:encoded><![CDATA[<p>Nice post.  I was wondering about some good uses for staticmethod. </p>
<p>Thanks,<br />Paul</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: PaulHildebrandt</title>
		<link>http://blog.tplus1.com/index.php/2008/08/31/now-i-have-a-reason-to-use-staticmethod/comment-page-1/#comment-1412</link>
		<dc:creator>PaulHildebrandt</dc:creator>
		<pubDate>Wed, 03 Sep 2008 06:24:22 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tplus1.com/?p=212#comment-1412</guid>
		<description>Nice post.  I was wondering about some good uses for staticmethod. &lt;br&gt;&lt;br&gt;Thanks,&lt;br&gt;Paul</description>
		<content:encoded><![CDATA[<p>Nice post.  I was wondering about some good uses for staticmethod. </p>
<p>Thanks,<br />Paul</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nicolas Miyasato (miya)</title>
		<link>http://blog.tplus1.com/index.php/2008/08/31/now-i-have-a-reason-to-use-staticmethod/comment-page-1/#comment-1406</link>
		<dc:creator>Nicolas Miyasato (miya)</dc:creator>
		<pubDate>Mon, 01 Sep 2008 14:20:38 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tplus1.com/?p=212#comment-1406</guid>
		<description>Awesome... I&#039;ve been asking myself the very same question for a long time..</description>
		<content:encoded><![CDATA[<p>Awesome&#8230; I&#39;ve been asking myself the very same question for a long time..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gary Bernhardt</title>
		<link>http://blog.tplus1.com/index.php/2008/08/31/now-i-have-a-reason-to-use-staticmethod/comment-page-1/#comment-1411</link>
		<dc:creator>Gary Bernhardt</dc:creator>
		<pubDate>Sun, 31 Aug 2008 20:27:36 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tplus1.com/?p=212#comment-1411</guid>
		<description>Yep, it could still mangle the parameters. I think I do that in a few places. The main benefit for me is that I can glance at a class and say &quot;Ok, I know that all actual changes to this object are isolated to these two non-static methods.&quot;</description>
		<content:encoded><![CDATA[<p>Yep, it could still mangle the parameters. I think I do that in a few places. The main benefit for me is that I can glance at a class and say &#8220;Ok, I know that all actual changes to this object are isolated to these two non-static methods.&#8221;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matt Wilson</title>
		<link>http://blog.tplus1.com/index.php/2008/08/31/now-i-have-a-reason-to-use-staticmethod/comment-page-1/#comment-1410</link>
		<dc:creator>Matt Wilson</dc:creator>
		<pubDate>Sun, 31 Aug 2008 18:00:09 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tplus1.com/?p=212#comment-1410</guid>
		<description>Hey Gary,&lt;br&gt;&lt;br&gt;I like the idea of using staticmethod as an annotation to make it clear that the method doesn&#039;t alter the class.  It could still have side effects though; it could mangle the parameters passed in, right?&lt;br&gt;&lt;br&gt;Matt</description>
		<content:encoded><![CDATA[<p>Hey Gary,</p>
<p>I like the idea of using staticmethod as an annotation to make it clear that the method doesn&#39;t alter the class.  It could still have side effects though; it could mangle the parameters passed in, right?</p>
<p>Matt</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matt Wilson</title>
		<link>http://blog.tplus1.com/index.php/2008/08/31/now-i-have-a-reason-to-use-staticmethod/comment-page-1/#comment-1408</link>
		<dc:creator>Matt Wilson</dc:creator>
		<pubDate>Sun, 31 Aug 2008 17:59:07 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tplus1.com/?p=212#comment-1408</guid>
		<description>Hi Pete,  Thanks for the comment.&lt;br&gt;&lt;br&gt;Could dict.fromkeys also be implemented as a classmethod?  I make alternate constructors all the time, but I make them classmethods, so that I still have a reference to the class that I want to make instances out of.  &lt;br&gt;&lt;br&gt;When I subclass a dict, then call fromkeys on my subclass, it returns an instance of my subclass.  I don&#039;t see how that would work with a staticmethod, since it doesn&#039;t seem to have any association with the class.&lt;br&gt;&lt;br&gt;I&#039;m not sure I understand what you mean about how large libraries don&#039;t know the module of every class.  Is it the case where module B imports a class from module A, and then another module C imports that class from module B?  In that case, I can definitely see the merit of bundling all related code together in the class.&lt;br&gt;&lt;br&gt;I&#039;m not against staticmethods.  I just never could see myself using them.&lt;br&gt;&lt;br&gt;Matt</description>
		<content:encoded><![CDATA[<p>Hi Pete,  Thanks for the comment.</p>
<p>Could dict.fromkeys also be implemented as a classmethod?  I make alternate constructors all the time, but I make them classmethods, so that I still have a reference to the class that I want to make instances out of.  </p>
<p>When I subclass a dict, then call fromkeys on my subclass, it returns an instance of my subclass.  I don&#39;t see how that would work with a staticmethod, since it doesn&#39;t seem to have any association with the class.</p>
<p>I&#39;m not sure I understand what you mean about how large libraries don&#39;t know the module of every class.  Is it the case where module B imports a class from module A, and then another module C imports that class from module B?  In that case, I can definitely see the merit of bundling all related code together in the class.</p>
<p>I&#39;m not against staticmethods.  I just never could see myself using them.</p>
<p>Matt</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: shredwheat</title>
		<link>http://blog.tplus1.com/index.php/2008/08/31/now-i-have-a-reason-to-use-staticmethod/comment-page-1/#comment-1407</link>
		<dc:creator>shredwheat</dc:creator>
		<pubDate>Sun, 31 Aug 2008 17:26:32 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tplus1.com/?p=212#comment-1407</guid>
		<description>If you&#039;ve ever used dict.fromkeys you are using a staticmethod. (Although it is implemented on the C side, so a little different). Hopefully this shows an example of another place staticmethod is great; alternate constructors.&lt;br&gt;&lt;br&gt;Larger libraries don&#039;t always have the luxury of knowing the module for every class that gets passed around. Using the static methods allows the entire api to travel around with the class description. This is a huge convenience. It is definitely for more than &quot;make java people comfortable.&quot;</description>
		<content:encoded><![CDATA[<p>If you&#39;ve ever used dict.fromkeys you are using a staticmethod. (Although it is implemented on the C side, so a little different). Hopefully this shows an example of another place staticmethod is great; alternate constructors.</p>
<p>Larger libraries don&#39;t always have the luxury of knowing the module for every class that gets passed around. Using the static methods allows the entire api to travel around with the class description. This is a huge convenience. It is definitely for more than &#8220;make java people comfortable.&#8221;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gary Bernhardt</title>
		<link>http://blog.tplus1.com/index.php/2008/08/31/now-i-have-a-reason-to-use-staticmethod/comment-page-1/#comment-1409</link>
		<dc:creator>Gary Bernhardt</dc:creator>
		<pubDate>Sun, 31 Aug 2008 16:37:36 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tplus1.com/?p=212#comment-1409</guid>
		<description>I use staticmethod to indicate that a method has no side effects (you can&#039;t modify self if it doesn&#039;t even get passed in). Using it to replace methods is interesting, but I always find that such things are non-obvious when I go back to the code after six months. I can think of a few situations in testing where it would&#039;ve been quite useful, though.</description>
		<content:encoded><![CDATA[<p>I use staticmethod to indicate that a method has no side effects (you can&#39;t modify self if it doesn&#39;t even get passed in). Using it to replace methods is interesting, but I always find that such things are non-obvious when I go back to the code after six months. I can think of a few situations in testing where it would&#39;ve been quite useful, though.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

