I found the following mistake in my code this week:
import datetime
d = datetime.date(2010,9,24)
if d.isoweekday == 5:
pass
Yes, it should be d.isoweekday() instead.
I know, if I had had a test-case for this I would have been saved. Comparing a function with 5 is not very useful. Oh, I'm not blaming Python for this.
My question: Are there tools that can spot errors like this one?