<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/'><id>tag:blogger.com,1999:blog-1534510840959803747.post8174645613441898897..comments</id><updated>2010-06-30T08:30:21.901+03:00</updated><category term='IronPython porting testing'/><category term='python ironpython vmware vimwrap'/><category term='ironpython'/><category term='ironpython testing'/><category term='python'/><category term='.net soap vmware'/><title type='text'>Comments on Midnight Oil: Combinations</title><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://www.ronnie-midnight-oil.net/feeds/8174645613441898897/comments/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1534510840959803747/8174645613441898897/comments/default'/><link rel='alternate' type='text/html' href='http://www.ronnie-midnight-oil.net/2008/05/ok.html'/><author><name>Ronnie Maor</name><uri>http://www.blogger.com/profile/04708863959844256563</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://bp1.blogger.com/_UonbnH9WJbc/SEEUFNeeFvI/AAAAAAAACRc/dCK0zD_77iw/S220/ronnie-smiling.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>8</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1534510840959803747.post-1705247426721505780</id><published>2010-06-30T08:30:21.896+03:00</published><updated>2010-06-30T08:30:21.896+03:00</updated><title type='text'>s/bogger/blogger/</title><content type='html'>s/bogger/blogger/</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1534510840959803747/8174645613441898897/comments/default/1705247426721505780'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1534510840959803747/8174645613441898897/comments/default/1705247426721505780'/><link rel='alternate' type='text/html' href='http://www.ronnie-midnight-oil.net/2008/05/ok.html?showComment=1277875821896#c1705247426721505780' title=''/><author><name>Dov Grobgeld</name><uri>http://www.blogger.com/profile/11136433566419599380</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.ronnie-midnight-oil.net/2008/05/ok.html' ref='tag:blogger.com,1999:blog-1534510840959803747.post-8174645613441898897' source='http://www.blogger.com/feeds/1534510840959803747/posts/default/8174645613441898897' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-349114803'/></entry><entry><id>tag:blogger.com,1999:blog-1534510840959803747.post-7422136068408704944</id><published>2010-06-30T08:29:02.029+03:00</published><updated>2010-06-30T08:29:02.029+03:00</updated><title type='text'>Hi Ronnie,

Sorry I missed that. I skimmed through...</title><content type='html'>Hi Ronnie,&lt;br /&gt;&lt;br /&gt;Sorry I missed that. I skimmed through your article too quickly, and I wasn&amp;#39;t familiar with the (i for i in whatever) generator construct. Neat!&lt;br /&gt;&lt;br /&gt;Regarding syntax highlightening I am not familiar with bogger at all, but I found the following link on the web that might help:&lt;br /&gt;&lt;br /&gt;http://yacoding.blogspot.com/2008/05/how-to-add-syntax-highlight-to-blogger.html</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1534510840959803747/8174645613441898897/comments/default/7422136068408704944'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1534510840959803747/8174645613441898897/comments/default/7422136068408704944'/><link rel='alternate' type='text/html' href='http://www.ronnie-midnight-oil.net/2008/05/ok.html?showComment=1277875742029#c7422136068408704944' title=''/><author><name>Dov Grobgeld</name><uri>http://www.blogger.com/profile/11136433566419599380</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.ronnie-midnight-oil.net/2008/05/ok.html' ref='tag:blogger.com,1999:blog-1534510840959803747.post-8174645613441898897' source='http://www.blogger.com/feeds/1534510840959803747/posts/default/8174645613441898897' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-349114803'/></entry><entry><id>tag:blogger.com,1999:blog-1534510840959803747.post-3425181266883430290</id><published>2010-06-29T19:28:43.290+03:00</published><updated>2010-06-29T19:28:43.290+03:00</updated><title type='text'>Dov - the final implementation above already uses ...</title><content type='html'>Dov - the final implementation above already uses generators (it changes the list comprehension to generator expressions).</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1534510840959803747/8174645613441898897/comments/default/3425181266883430290'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1534510840959803747/8174645613441898897/comments/default/3425181266883430290'/><link rel='alternate' type='text/html' href='http://www.ronnie-midnight-oil.net/2008/05/ok.html?showComment=1277828923290#c3425181266883430290' title=''/><author><name>Ronnie Maor</name><uri>http://www.blogger.com/profile/04708863959844256563</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://bp1.blogger.com/_UonbnH9WJbc/SEEUFNeeFvI/AAAAAAAACRc/dCK0zD_77iw/S220/ronnie-smiling.jpg'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.ronnie-midnight-oil.net/2008/05/ok.html' ref='tag:blogger.com,1999:blog-1534510840959803747.post-8174645613441898897' source='http://www.blogger.com/feeds/1534510840959803747/posts/default/8174645613441898897' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1662497853'/></entry><entry><id>tag:blogger.com,1999:blog-1534510840959803747.post-8813688613901554606</id><published>2010-06-29T17:33:32.907+03:00</published><updated>2010-06-29T17:33:32.907+03:00</updated><title type='text'>Hi Ronnie,

Just found your blog. A shame I didn&amp;#...</title><content type='html'>Hi Ronnie,&lt;br /&gt;&lt;br /&gt;Just found your blog. A shame I didn&amp;#39;t find it before, so that I got more feeling of your problems... How well.&lt;br /&gt;&lt;br /&gt;I also toyed around with a similar problem in my beginning Python days, but I did it through generators, which has the advantage that it doesn&amp;#39;t fill up the memory with the complete list. Here is my permutation solution:&lt;br /&gt;&lt;br /&gt;def permute(a):&lt;br /&gt;__if len(a)==1:&lt;br /&gt;____yield a&lt;br /&gt;__else:&lt;br /&gt;____for p in permute(a[1:]):&lt;br /&gt;______for i in xrange(len(a)):&lt;br /&gt;________yield p[0:i]+[a[0]]+p[i:]&lt;br /&gt;__&lt;br /&gt;for p in permute([1,2,3]):&lt;br /&gt;__print p&lt;br /&gt;&lt;br /&gt;(You should definitely look for a blogging platform that allows embedding code... Meanwhile do s/^_/ /g.)&lt;br /&gt;&lt;br /&gt;But you are absolutely correct that today we should be using itertools and not crafting solutions like this on our own.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1534510840959803747/8174645613441898897/comments/default/8813688613901554606'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1534510840959803747/8174645613441898897/comments/default/8813688613901554606'/><link rel='alternate' type='text/html' href='http://www.ronnie-midnight-oil.net/2008/05/ok.html?showComment=1277822012907#c8813688613901554606' title=''/><author><name>Dov Grobgeld</name><uri>http://www.blogger.com/profile/11136433566419599380</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.ronnie-midnight-oil.net/2008/05/ok.html' ref='tag:blogger.com,1999:blog-1534510840959803747.post-8174645613441898897' source='http://www.blogger.com/feeds/1534510840959803747/posts/default/8174645613441898897' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-349114803'/></entry><entry><id>tag:blogger.com,1999:blog-1534510840959803747.post-9013747005797787797</id><published>2010-04-23T22:58:45.949+03:00</published><updated>2010-04-23T22:58:45.949+03:00</updated><title type='text'>I still like this code, but for practical purposes...</title><content type='html'>I still like this code, but for practical purposes you should now use itertools.product which is part of the standard library. no point in writing your own anymore. This was added in Python 2.6&lt;br /&gt;&lt;br /&gt;They also threw in permutations and combinations (their combinations is named after the mathematical construct from combinatorics - all subsets of size k)</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1534510840959803747/8174645613441898897/comments/default/9013747005797787797'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1534510840959803747/8174645613441898897/comments/default/9013747005797787797'/><link rel='alternate' type='text/html' href='http://www.ronnie-midnight-oil.net/2008/05/ok.html?showComment=1272052725949#c9013747005797787797' title=''/><author><name>Ronnie Maor</name><uri>http://www.blogger.com/profile/04708863959844256563</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://bp1.blogger.com/_UonbnH9WJbc/SEEUFNeeFvI/AAAAAAAACRc/dCK0zD_77iw/S220/ronnie-smiling.jpg'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.ronnie-midnight-oil.net/2008/05/ok.html' ref='tag:blogger.com,1999:blog-1534510840959803747.post-8174645613441898897' source='http://www.blogger.com/feeds/1534510840959803747/posts/default/8174645613441898897' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1662497853'/></entry><entry><id>tag:blogger.com,1999:blog-1534510840959803747.post-532951323101722569</id><published>2008-06-03T00:23:00.000+03:00</published><updated>2008-06-03T00:23:00.000+03:00</updated><title type='text'>Hi, Ronnie,&lt;br&gt;Yes, it's a cute way to use list co...</title><content type='html'>Hi, Ronnie,&lt;BR/&gt;Yes, it's a cute way to use list comprehensions. I used a similar solution the other week, when wanting to enumerate over all SUBSETS of a list.&lt;BR/&gt;&lt;BR/&gt;BTW, regarding the "sorting for humans" post you link to, you should see my take on this in&lt;BR/&gt;http://brand.site.co.il/riddles/200803q.html&lt;BR/&gt;&lt;BR/&gt;Cheers,&lt;BR/&gt;M.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1534510840959803747/8174645613441898897/comments/default/532951323101722569'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1534510840959803747/8174645613441898897/comments/default/532951323101722569'/><link rel='alternate' type='text/html' href='http://www.ronnie-midnight-oil.net/2008/05/ok.html?showComment=1212441780000#c532951323101722569' title=''/><author><name>Michael Brand</name><uri>http://www.blogger.com/profile/14341312797073825464</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.ronnie-midnight-oil.net/2008/05/ok.html' ref='tag:blogger.com,1999:blog-1534510840959803747.post-8174645613441898897' source='http://www.blogger.com/feeds/1534510840959803747/posts/default/8174645613441898897' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-968956134'/></entry><entry><id>tag:blogger.com,1999:blog-1534510840959803747.post-5233158761810656017</id><published>2008-06-02T12:15:00.000+03:00</published><updated>2008-06-02T12:15:00.000+03:00</updated><title type='text'>Hey Michael - thanks for the encouragement and the...</title><content type='html'>Hey Michael - thanks for the encouragement and the tip!&lt;BR/&gt;&lt;BR/&gt;I actually wasn't expecting anyone that's not a coworker or family member to be reading this yet :-)&lt;BR/&gt;&lt;BR/&gt;I'll go over itertools. At the worst it will be a good opportunity  to refresh myself with what's in there - I read it once, but never used it.&lt;BR/&gt;&lt;BR/&gt;Ronnie</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1534510840959803747/8174645613441898897/comments/default/5233158761810656017'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1534510840959803747/8174645613441898897/comments/default/5233158761810656017'/><link rel='alternate' type='text/html' href='http://www.ronnie-midnight-oil.net/2008/05/ok.html?showComment=1212398100000#c5233158761810656017' title=''/><author><name>Ronnie Maor</name><uri>http://www.blogger.com/profile/04708863959844256563</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://bp1.blogger.com/_UonbnH9WJbc/SEEUFNeeFvI/AAAAAAAACRc/dCK0zD_77iw/S220/ronnie-smiling.jpg'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.ronnie-midnight-oil.net/2008/05/ok.html' ref='tag:blogger.com,1999:blog-1534510840959803747.post-8174645613441898897' source='http://www.blogger.com/feeds/1534510840959803747/posts/default/8174645613441898897' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1662497853'/></entry><entry><id>tag:blogger.com,1999:blog-1534510840959803747.post-7899446550541857469</id><published>2008-06-02T10:42:00.000+03:00</published><updated>2008-06-02T10:42:00.000+03:00</updated><title type='text'>Hey Ronnie, great to see you're blogging. Nice ent...</title><content type='html'>Hey Ronnie, great to see you're blogging. Nice entry. I always find that nesting list comprehensions mangle my mind - at least I can come back to this as a reference.&lt;BR/&gt;&lt;BR/&gt;You *may* find that some of the stuff in the itertools module can help make your examples even more elegant.&lt;BR/&gt;&lt;BR/&gt;Michael Foord</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1534510840959803747/8174645613441898897/comments/default/7899446550541857469'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1534510840959803747/8174645613441898897/comments/default/7899446550541857469'/><link rel='alternate' type='text/html' href='http://www.ronnie-midnight-oil.net/2008/05/ok.html?showComment=1212392520000#c7899446550541857469' title=''/><author><name>Fuzzyman</name><uri>http://www.blogger.com/profile/06229713779852499022</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.ronnie-midnight-oil.net/2008/05/ok.html' ref='tag:blogger.com,1999:blog-1534510840959803747.post-8174645613441898897' source='http://www.blogger.com/feeds/1534510840959803747/posts/default/8174645613441898897' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-777902409'/></entry></feed>
