<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Disqus - Friends of aaronoliver</title><link>http://disqus.com/by/aaronoliver/</link><description></description><atom:link href="http://disqus.com/aaronoliver/friends.rss" rel="self"></atom:link><language>en</language><lastBuildDate>Mon, 21 Jul 2008 09:03:56 -0000</lastBuildDate><item><title>Re: defaultdict.fromkeys does not play nice.</title><link>(u'http://blog.tplus1.com/blog/2008/06/03/defaultdictfromkeys-does-not-play-nice/',%20580581L)#comment-580581</link><description>&lt;p&gt;Hey Gary, thanks for the comment.&lt;/p&gt;&lt;p&gt;Setting the default_factory after I make an instance doesn't go back and rerun the keys through the default factory.  So, in that sense, fromkeys is kinda useless to me.  That's why I'd prefer that it just raised that NotImplementedError.&lt;/p&gt;&lt;p&gt;&amp;gt;&amp;gt;&amp;gt; b = defaultdict.fromkeys(['x', 'y'], list)&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; b&lt;br&gt;defaultdict(None, {'y': &amp;lt;type 'list'=""&amp;gt;, 'x': &amp;lt;type 'list'=""&amp;gt;})&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; b.default_factory = list&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; b['z']&lt;br&gt;[]&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; b['x']&lt;br&gt;&amp;lt;type 'list'=""&amp;gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Matt Wilson</dc:creator><pubDate>Tue, 03 Jun 2008 13:33:59 -0000</pubDate></item><item><title>Re: defaultdict.fromkeys does not play nice.</title><link>(u'http://blog.tplus1.com/blog/2008/06/03/defaultdictfromkeys-does-not-play-nice/',%20589310L)#comment-589310</link><description>&lt;p&gt;Hey Georg,&lt;/p&gt;&lt;p&gt;Yeah, I agree that the defaultdict.fromkeys behavior is not a bug, but it does seem a little surprising.  Anyhow, I posted to comp.lang.python &lt;a href="http://groups.google.com/group/comp.lang.python/browse_thread/thread/9a93f02c7ecd018a#" rel="nofollow noopener" target="_blank" title="http://groups.google.com/group/comp.lang.python/browse_thread/thread/9a93f02c7ecd018a#"&gt;here&lt;/a&gt; about this topic and got some pretty good explanation.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Matt Wilson</dc:creator><pubDate>Wed, 04 Jun 2008 10:32:46 -0000</pubDate></item><item><title>Re: Wacky idea for python coroutines</title><link>(u'http://blog.tplus1.com/blog/2008/06/13/wacky-idea-for-python-coroutines/',%20679924L)#comment-679924</link><description>&lt;p&gt;Florian -- I don't think I follow you.  What do you mean by yielding across call stacks?  How is that different than regular yield and send?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Matt Wilson</dc:creator><pubDate>Sun, 15 Jun 2008 13:56:18 -0000</pubDate></item><item><title>Re: Wacky idea for python coroutines</title><link>(u'http://blog.tplus1.com/blog/2008/06/13/wacky-idea-for-python-coroutines/',%20680427L)#comment-680427</link><description>&lt;p&gt;Florian, thanks for the extra detail.  I think I need to study co-routines in stackless, pypy, and greenlets before I will really understand your point.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Matt Wilson</dc:creator><pubDate>Sun, 15 Jun 2008 16:37:24 -0000</pubDate></item><item><title>Re: My netflix problem</title><link>(u'http://blog.tplus1.com/blog/2008/06/17/my-netflix-problem/',%20700090L)#comment-700090</link><description>&lt;p&gt;Sounds like a good idea.  "No Country" in particular seemed really slow and grisly.  Lindsey read the book Atonement, and she liked that, so that's how that one landed on the list.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Matt Wilson</dc:creator><pubDate>Wed, 18 Jun 2008 12:42:05 -0000</pubDate></item><item><title>Re: Wacky idea for python coroutines</title><link>(u'http://blog.tplus1.com/blog/2008/06/13/wacky-idea-for-python-coroutines/',%20721547L)#comment-721547</link><description>&lt;p&gt;Hi Calvin -- thanks for the comment!  After the callback fires, how can I go back into the code that originally raised the exception?  As far as I understand, that frame is inacessible.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Matt Wilson</dc:creator><pubDate>Sat, 21 Jun 2008 09:48:42 -0000</pubDate></item><item><title>Re: Don&amp;#8217;t spend your termite poison money on insurance against Martian invasions.</title><link>(u'http://blog.tplus1.com/blog/2008/07/03/dont-spend-your-termite-poison-money-on-insurance-against-martian-invasions/',%20812297L)#comment-812297</link><description>&lt;p&gt;Hi DomesticMouse,&lt;/p&gt;&lt;p&gt;Yeah, I agree, the lenders could lend to anyone that could scratch an X on the application, and they knew they could hand off the risk to somebody else down the chain.&lt;/p&gt;&lt;p&gt;I think Fannie Mae and Freddie Mac grew like tumors on lab rats during the go-go 90s.  Now they're so highly leveraged that even moderate tremors causes the whole house of cards to crash down.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Matt Wilson</dc:creator><pubDate>Fri, 04 Jul 2008 01:13:03 -0000</pubDate></item><item><title>Re: Help improve my PyOhio talk</title><link>(u'http://blog.tplus1.com/blog/2008/07/07/help-improve-my-pyohio-talk/',%20834583L)#comment-834583</link><description>&lt;p&gt;I think you did plug Bruce!  Anyway, I'm not stuck with S5 at all.  I really like reST, so I don't want to give that up.  The fact that I can verify all my code snippets with doctest.testfile is immensely helpful.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Matt Wilson</dc:creator><pubDate>Tue, 08 Jul 2008 08:48:31 -0000</pubDate></item><item><title>Re: Help improve my PyOhio talk</title><link>(u'http://blog.tplus1.com/blog/2008/07/07/help-improve-my-pyohio-talk/',%20834590L)#comment-834590</link><description>&lt;p&gt;Yep, you described the problems that kept happening last night.  Gonna check out Bruce now.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Matt Wilson</dc:creator><pubDate>Tue, 08 Jul 2008 08:50:04 -0000</pubDate></item><item><title>Re: Help improve my PyOhio talk</title><link>(u'http://blog.tplus1.com/blog/2008/07/07/help-improve-my-pyohio-talk/',%20839447L)#comment-839447</link><description>&lt;p&gt;So, Bruce could really benefit from a hello-world example on the web page.  You gotta do a little to entice people!&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Matt Wilson</dc:creator><pubDate>Tue, 08 Jul 2008 17:49:32 -0000</pubDate></item><item><title>Re: Help improve my PyOhio talk</title><link>(u'http://blog.tplus1.com/blog/2008/07/07/help-improve-my-pyohio-talk/',%20849030L)#comment-849030</link><description>&lt;p&gt;Hi David, That is an approach I considered, but I really like the simplicity of a single presentation format.  Less can go wrong.&lt;/p&gt;&lt;p&gt;I could do the whole presentation just from a single really-long text file, I suppose....&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Matt Wilson</dc:creator><pubDate>Wed, 09 Jul 2008 18:11:53 -0000</pubDate></item><item><title>Re: Help improve my PyOhio talk</title><link>(u'http://blog.tplus1.com/blog/2008/07/07/help-improve-my-pyohio-talk/',%20849044L)#comment-849044</link><description>&lt;p&gt;Hi Kumar,&lt;/p&gt;&lt;p&gt;Yeah, I used &lt;a href="http://rst2s5.py" rel="nofollow noopener" target="_blank" title="rst2s5.py"&gt;rst2s5.py&lt;/a&gt; also.  Problems surfaced when the projector had a resolution of 1024x768, which is smaller than my laptop's 1440x900 resolution.&lt;/p&gt;&lt;p&gt;I'm going to study that starscream slideshow app also.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Matt Wilson</dc:creator><pubDate>Wed, 09 Jul 2008 18:13:27 -0000</pubDate></item><item><title>Re: Help improve my PyOhio talk</title><link>(u'http://blog.tplus1.com/blog/2008/07/07/help-improve-my-pyohio-talk/',%20880808L)#comment-880808</link><description>&lt;p&gt;Thanks David, I think I'll take that path.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Matt Wilson</dc:creator><pubDate>Sun, 13 Jul 2008 14:49:56 -0000</pubDate></item><item><title>Re: I heart Python doctests</title><link>(u'http://blog.tplus1.com/blog/2008/07/14/python-doctests-seem-underappreciated/',%20891110L)#comment-891110</link><description>&lt;p&gt;moved this comment to the reply it was meant to be.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Matt Wilson</dc:creator><pubDate>Mon, 14 Jul 2008 17:53:18 -0000</pubDate></item><item><title>Re: I heart Python doctests</title><link>(u'http://blog.tplus1.com/blog/2008/07/14/python-doctests-seem-underappreciated/',%20891166L)#comment-891166</link><description>&lt;p&gt;Hi Michael, Thanks for the comment!&lt;/p&gt;&lt;p&gt;I'm not sure I understand your point about tests in several places. The tests are in two places at most; the docstring, and then whatever external tests I write. It isn't difficult to trace them all down quickly because everything is in predictable locations.&lt;/p&gt;&lt;p&gt;I think that the *right kind of tests* are useful as documentation. It's sometimes easier to show rather than tell. Sure, a 200-line docstring is goofy. But I don't find myself writing those kinds of doctests.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Matt Wilson</dc:creator><pubDate>Mon, 14 Jul 2008 17:58:21 -0000</pubDate></item><item><title>Re: I heart Python doctests</title><link>(u'http://blog.tplus1.com/blog/2008/07/14/python-doctests-seem-underappreciated/',%20892373L)#comment-892373</link><description>&lt;p&gt;Hi Olivstor, I don't think you can invoke the Zen since Tim Peters is the guy that wrote both the Zen AND came up with the idea for doctests :)&lt;/p&gt;&lt;p&gt;But in terms of practicality, I think it would be straightforward to come up with some rules for when to use which test framework; e.g., if you need a big long list of fixtures, please use something besides a doctest.&lt;/p&gt;&lt;p&gt;So, the "obvious" way to do it would be to look at the testing needs and then let dictate which tool to use.&lt;/p&gt;&lt;p&gt;The "one obvious way to do it" doesn't mean (by my interpretation, anyway), to use the same tool for everything.&lt;/p&gt;&lt;p&gt;Python has for-loops, iterators, generator expressions, and map.  They're all appropriate in different contexts.&lt;/p&gt;&lt;p&gt;Anyhow, thanks for the comment!&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Matt Wilson</dc:creator><pubDate>Mon, 14 Jul 2008 20:36:47 -0000</pubDate></item><item><title>Re: I heart Python doctests</title><link>(u'http://blog.tplus1.com/blog/2008/07/14/python-doctests-seem-underappreciated/',%20892929L)#comment-892929</link><description>&lt;p&gt;Hi Terry, Yeah, I do use the doctests plugin for nose.  So when I run my doctests, I do $ nosetests --with-doctest &lt;a href="http://blah.py" rel="nofollow noopener" target="_blank" title="blah.py"&gt;blah.py&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Well, actually, with-doctest=1 is in my $HOME/.noserc, so I don't need the --with-doctest option.&lt;br&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Matt Wilson</dc:creator><pubDate>Mon, 14 Jul 2008 21:58:29 -0000</pubDate></item><item><title>Re: I heart Python doctests</title><link>(u'http://blog.tplus1.com/blog/2008/07/14/python-doctests-seem-underappreciated/',%20895753L)#comment-895753</link><description>&lt;p&gt;Masklinn -- thanks for the regexp  help!  I hoped there was a way to do it.  Code updated.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Matt Wilson</dc:creator><pubDate>Tue, 15 Jul 2008 08:52:44 -0000</pubDate></item><item><title>Re: I heart Python doctests</title><link>(u'http://blog.tplus1.com/blog/2008/07/14/python-doctests-seem-underappreciated/',%20895770L)#comment-895770</link><description>&lt;p&gt;Yeah, doctests are so simple to write that *anybody* can start writing tests, and I believe that any automated testing, even if it only covers 10% of the code, is still a huge help.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Matt Wilson</dc:creator><pubDate>Tue, 15 Jul 2008 08:55:41 -0000</pubDate></item><item><title>Re: Google Releases Mox for Python Mocking, I Giggle and Clap My Hands Like a Kid on Christmas</title><link>(u'http://www.codesoftly.aaronoliver.com/2008/07/google-releases-mox-for-python-mocking-i-giggle-and-clap-my-hands-like-a-kid-on-christmas.html',%20920453L)#comment-920453</link><description>&lt;p&gt;Maybe you should write a python mock shootout article.  Every mock object package seems to fall down somewhere.  And it would be nice to know the holes before I spend a few hours plowing through the cryptic docs and getting my hopes up.&lt;/p&gt;&lt;p&gt;If that article takes too long to execute, maybe write a much shorter article to stand in for the real thing.  rimshot!&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Matt Wilson</dc:creator><pubDate>Thu, 17 Jul 2008 10:04:03 -0000</pubDate></item><item><title>Re: I need to write faster tests</title><link>(u'http://blog.tplus1.com/blog/2008/07/18/i-need-to-write-faster-tests/',%20935091L)#comment-935091</link><description>&lt;p&gt;...&lt;br&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Matt Wilson</dc:creator><pubDate>Fri, 18 Jul 2008 14:25:47 -0000</pubDate></item><item><title>Re: I need to write faster tests</title><link>(u'http://blog.tplus1.com/blog/2008/07/18/i-need-to-write-faster-tests/',%20935094L)#comment-935094</link><description>&lt;p&gt;Hi Kumar, thanks for the comment! I saw your fixture project earlier today on planetpython. Right now, my setup code doesn't go through the app to setup. It makes a database connection directly and monkeys around.&lt;/p&gt;&lt;p&gt;All my tests use the same setup and teardown, so each test starts at the same state. That still might not let me run tests in parallel, however, since they're all working on the same user objects. If I could run all these in parallel, that would likely cut time way down. Maybe I could change my setup code so that each test gets objects created with names just for them.&lt;/p&gt;&lt;p&gt;I'll be the first one to admit that I have a lot more to learn in terms of testing. Right now, I feel a lot of frustration waiting for these things to finish execution.&lt;/p&gt;&lt;p&gt;I'll check out fixture over the weekend. Thanks for the tips. &lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Matt Wilson</dc:creator><pubDate>Fri, 18 Jul 2008 14:26:13 -0000</pubDate></item><item><title>Re: I need to write faster tests</title><link>(u'http://blog.tplus1.com/blog/2008/07/18/i-need-to-write-faster-tests/',%20938248L)#comment-938248</link><description>&lt;p&gt;Yeah, I think maybe there's nothing wrong with these narrative-based tests, but I would like to separate them from my other split-second tests.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Matt Wilson</dc:creator><pubDate>Fri, 18 Jul 2008 20:25:22 -0000</pubDate></item><item><title>Re: I need to write faster tests</title><link>(u'http://blog.tplus1.com/blog/2008/07/18/i-need-to-write-faster-tests/',%20938256L)#comment-938256</link><description>&lt;p&gt;The other thing that unit tests won't catch is when one unit alters its interface but the second unit doesn't find out about it.&lt;/p&gt;&lt;p&gt;Incidentally, I don't agree with the idea that interfaces shouldn't change.  If I come up with a better way of doing something, I'm going to do it.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Matt Wilson</dc:creator><pubDate>Fri, 18 Jul 2008 20:27:28 -0000</pubDate></item><item><title>Re: Supply-side economics explained</title><link>(u'http://blog.tplus1.com/blog/2008/07/11/supply-side-economics-explained/',%20955295L)#comment-955295</link><description>&lt;p&gt;...&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Matt Wilson</dc:creator><pubDate>Mon, 21 Jul 2008 09:03:56 -0000</pubDate></item></channel></rss>