In Python, why is a bare function object valid code?
<p>Why is the following valid?</p>

<pre><code>#!/usr/bin/python
def spam():
   pass

spam
</code></pre>

<p>I understand that functions are objects but I think code such as the above is never useful and always the result of a mistake. Why doesn't it result in an error on the line referencing the spam function object?</p>
