On Sat, 18 Sep 2010 19:09:33 -0700 (PDT) Carl Banks <pavlovevide...@gmail.com> wrote:
> On Sep 17, 1:01 pm, Andreas Waldenburger <use...@geekmail.invalid> > wrote: > > On Thu, 16 Sep 2010 16:20:33 -0400 AK <andrei....@gmail.com> wrote: > > > > > I also like this construct that works, I think, since 2.6: > > > > > code = dir[int(num):] if side == 'l' else dir[:-1*int(num)] > > > > I wonder when this construct will finally start to look good. > > I don't know if it'll ever look good, per se, but it looks better when > it's used in rule-exception sort of case: > > something = rule if condition else exception > Spot on. I (more or less) like it when used that way, too. But it seems to invite crackers like the example above, and that irks me. /W -- INVALID? DE! -- http://mail.python.org/mailman/listinfo/python-list