Finally found a use for lambda!

Peter Hansen peter at engcorp.com
Mon Sep 15 14:00:56 EDT 2003


Hannu Kankaanpää wrote:
> 
> follower at iname.com (Follower) wrote in message news:<d2f38965.0309150133.4aef2253 at posting.google.com>...
> > > Of course, now that I think about it, I could have also written:
> > >         self.assertEqual (foo.has_key ('bar')), 0)
> >
> > ObMinimalism attempt:
> >
> >       self.failIf(foo.has_key('bar'))
> 
> That's not really minimalism (ObMinimalism=Obfuscation Minimalism?
> That even less!). That is actually The way to do it. You can just
> read it out loud and it makes sense immediately.

Some folks prefer to stick with the positive logic (assert X) 
always, rather than risk confusion by mixing and matching in an
arbitrary manner.

Personally, I couldn't keep the negative logic of the "fail X"
style straight and had to give it up.

-Peter




More information about the Python-list mailing list