: >> This is only true if n < 5. Otherwise, the first returns None and the >> second returns False. > > Which is why I said: > > return expr or None > > But hey let's argue the point to death!
Ok ;-) I think the point is that OP doesn't want to return *at all* if expr is False - presumably because there are further statements after the proposed 'conditional' return. Anyway, return? expr isn't very pythonic - so how about one of these? return expr if True return expr else continue I kid, I kid ... -[]z. -- http://mail.python.org/mailman/listinfo/python-list