On 27 October 2010 18:27, Arnaud Delobelle <arno...@gmail.com> wrote:
> True. It's far too verbose. I'd go for something like: > > f=lambda n:n<=0 or n*f(~-n) > > I've saved a few precious keystrokes and used the very handy ~- idiom! > Huh, I've never seen that one before. Seems to work on both positive and negative numbers. Is there a caveat to this? Cheers, Xav
-- http://mail.python.org/mailman/listinfo/python-list