No, because merging the first two `if` statements changes the conditions under which the `elif` runs. To be exactly equivalent, it would need to be like this:

    if getattr() and not trim_trailing_whitespace:
        ...
    elif not getattr() and trim_trailing_whitespace:
        ...