The rstrip-whitespace.py script contains redundant code.

This script performed the operation of applying rstrip() to all lines in a file three consecutive times. This a case of belt, suspenders and a safety pin. Only one such operation is required. Let's pick one possibly dependent on the size of the input file.

I suggest using timeit to determine which method has the best performance and under what circumstance each may be required in order to perform successfully for files up to some maximum size.

The aforementioned maximum size needs to be established.

I am willing to offer a patch.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.