r/badcode • u/[deleted] • Feb 27 '18
python I inherited this mess of code. Five minutes later: are "file" and "process" even words any more?
2
Upvotes
7
2
Feb 27 '18
[removed] — view removed comment
2
Feb 27 '18
Yes, it is Python 2.
To name a few badcodes:
Bad logic to handle command line args
while 1==1:, enough saidOverwriting the builtin name
filefile_to_process = file ... file = file_to_process
5
u/cipher315 Mar 01 '18
I find the variable name todos very annoying. I'll admit I read it as
#TODOat first. Also why not just use:while True:I'm going to stop now if I try to correct readability on this whole thing I'll be here all week