Also I think that variable should be trim_trailing_whitespace per PEP8: http://www.python.org/dev/peps/pep-0008/#method-names-and-instance-variables