Remove dead code and fix off-by-one in current_balance_estimate #16
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Severity: high
Category: bug
Location:
mortgage.py:111-124Problem
Lines 111-114 are an
if False:dead loop. The lookupschedule[months_elapsed]returns the balance AFTER the first payment at month 0, so the estimate is always one period low.Suggested fix
Delete the dead loop; index
schedule[max(months_elapsed-1, 0)]['balance'].Filed by automated code review.