Why does Python allow comparison of a callable and a number?
<p>I used python to write an assignment last week, here is a code snippet</p>

<pre><code>def departTime():
    '''
    Calculate the time to depart a packet.
    '''
    if(random.random &lt; 0.8):
        t = random.expovariate(1.0 / 2.5)
    else:
        t = random.expovariate(1.0 / 10.5)
    return t
</code></pre>

<p>Can you see the problem?  I compare random.random with 0.8,  which
should be random.random().</p>

<p>Of course this because of my careless, but I don't get it.  In my
opinion, this kind of comparison should invoke a least a warning in
any programming language.</p>

<p>So why does python just ignore it and return False? </p>
