<?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: A functional task, I am sure</title>
	<atom:link href="http://wolfram.kriesing.de/blog/index.php/2008/a-functional-task-i-am-sure/feed" rel="self" type="application/rss+xml" />
	<link>http://wolfram.kriesing.de/blog/index.php/2008/a-functional-task-i-am-sure</link>
	<description>all the other blogs have such cool names, I don't know one ...</description>
	<pubDate>Sun, 20 May 2012 21:48:05 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Wolfram</title>
		<link>http://wolfram.kriesing.de/blog/index.php/2008/a-functional-task-i-am-sure/comment-page-1#comment-143443</link>
		<dc:creator>Wolfram</dc:creator>
		<pubDate>Thu, 21 Feb 2008 08:47:03 +0000</pubDate>
		<guid isPermaLink="false">http://wolfram.kriesing.de/blog/index.php/2008/a-functional-task-i-am-sure#comment-143443</guid>
		<description>thank you alex!
just for those like me, who didnt know DSU="decorate-sort-undecorate", as Bär mentioned ... 
and btw i just found http://www.strayneuron.com/blog/archives/298 solving the same problem, glad i am not alone :-)

thx all</description>
		<content:encoded><![CDATA[<p>thank you alex!<br />
just for those like me, who didnt know DSU=&#8221;decorate-sort-undecorate&#8221;, as Bär mentioned &#8230;<br />
and btw i just found <a href="http://www.strayneuron.com/blog/archives/298" rel="nofollow">http://www.strayneuron.com/blog/archives/298</a> solving the same problem, glad i am not alone <img src='http://wolfram.kriesing.de/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>thx all</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alex Martelli</title>
		<link>http://wolfram.kriesing.de/blog/index.php/2008/a-functional-task-i-am-sure/comment-page-1#comment-143190</link>
		<dc:creator>Alex Martelli</dc:creator>
		<pubDate>Wed, 20 Feb 2008 22:41:52 +0000</pubDate>
		<guid isPermaLink="false">http://wolfram.kriesing.de/blog/index.php/2008/a-functional-task-i-am-sure#comment-143190</guid>
		<description>Actually, your 1-liner is returning key-value pairs (sorted by value), not just keys sorted by values (IDs sorted by rank, in your case); for the latter task, there's an even simpler and more elegant 1-liner:

    sorted(d, key=d.get)

The key= feature of sort/sorted internally does DSU at high speed and with maximal precision (it will never compare ANYTHING but the specified sorting key; items with identical sorting keys remain in the same order as they were in the input), so there's little need nowadays to delve into implementing DSU by hand (and I say that happily, even though years ago my articles, posts and books were instrumental in popularizing DSU;-).


Alex</description>
		<content:encoded><![CDATA[<p>Actually, your 1-liner is returning key-value pairs (sorted by value), not just keys sorted by values (IDs sorted by rank, in your case); for the latter task, there&#8217;s an even simpler and more elegant 1-liner:</p>
<p>    sorted(d, key=d.get)</p>
<p>The key= feature of sort/sorted internally does DSU at high speed and with maximal precision (it will never compare ANYTHING but the specified sorting key; items with identical sorting keys remain in the same order as they were in the input), so there&#8217;s little need nowadays to delve into implementing DSU by hand (and I say that happily, even though years ago my articles, posts and books were instrumental in popularizing DSU;-).</p>
<p>Alex</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bär</title>
		<link>http://wolfram.kriesing.de/blog/index.php/2008/a-functional-task-i-am-sure/comment-page-1#comment-142358</link>
		<dc:creator>Bär</dc:creator>
		<pubDate>Tue, 19 Feb 2008 16:35:21 +0000</pubDate>
		<guid isPermaLink="false">http://wolfram.kriesing.de/blog/index.php/2008/a-functional-task-i-am-sure#comment-142358</guid>
		<description>You use the decorate-sort-undecorate pattern.
http://wiki.python.org/moin/HowTo/Sorting.</description>
		<content:encoded><![CDATA[<p>You use the decorate-sort-undecorate pattern.<br />
<a href="http://wiki.python.org/moin/HowTo/Sorting" rel="nofollow">http://wiki.python.org/moin/HowTo/Sorting</a>.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daniel Lange</title>
		<link>http://wolfram.kriesing.de/blog/index.php/2008/a-functional-task-i-am-sure/comment-page-1#comment-142350</link>
		<dc:creator>Daniel Lange</dc:creator>
		<pubDate>Tue, 19 Feb 2008 16:18:40 +0000</pubDate>
		<guid isPermaLink="false">http://wolfram.kriesing.de/blog/index.php/2008/a-functional-task-i-am-sure#comment-142350</guid>
		<description>Or this (Python 2.4+)?
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/304440</description>
		<content:encoded><![CDATA[<p>Or this (Python 2.4+)?<br />
<a href="http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/304440" rel="nofollow">http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/304440</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daniel Lange</title>
		<link>http://wolfram.kriesing.de/blog/index.php/2008/a-functional-task-i-am-sure/comment-page-1#comment-142347</link>
		<dc:creator>Daniel Lange</dc:creator>
		<pubDate>Tue, 19 Feb 2008 16:13:46 +0000</pubDate>
		<guid isPermaLink="false">http://wolfram.kriesing.de/blog/index.php/2008/a-functional-task-i-am-sure#comment-142347</guid>
		<description>Does this help?
http://aspn.activestate.com/ASPN/Python/Cookbook/Recipe/52306</description>
		<content:encoded><![CDATA[<p>Does this help?<br />
<a href="http://aspn.activestate.com/ASPN/Python/Cookbook/Recipe/52306" rel="nofollow">http://aspn.activestate.com/ASPN/Python/Cookbook/Recipe/52306</a></p>
]]></content:encoded>
	</item>
</channel>
</rss>

