Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Even worse yet is when people do

    if some_function(arg, arg2):
        result = True
    else:
        result = False

    return result
Obviously a waste of time and lines of code. Instead, do

    return some_function(arg, arg2)
Unless anything else needs to be done with the result of some_function but that's not the case I'm talking about, I'm talking about when it looks like above.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: