Are there tools that can spot errors like this one?
<p>I found the following mistake in my code this week:</p>

<pre><code>import datetime

d = datetime.date(2010,9,24)
if d.isoweekday == 5:
    pass
</code></pre>

<p>Yes, it should be d.isoweekday() instead.</p>

<p>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.</p>

<p>My question: Are there tools that can spot errors like this one?</p>
