[Tutor] Tutor Digest, Vol 92, Issue 128
Asokan Pichai
pasokan at talentsprint.com
Mon Oct 31 18:26:21 CET 2011
Hugo's explanation is nice and clear.
You may also want to look at this way
Consider the most simplified form of the issue
def alpha():
if X:
beta()
else:
return q
Here in the* if branch* nothing is returned
while in the *else branch *something is being returned.
That is whenever X is True nothing is returned from alpha().
Even if beta() returns something that is not being used.
But when X is False something (q in this simplistic example)
is being returned
So this is a bug.
HTH
Asokan Pichai
SVP - Learning and Development
“Faith consists in believing when it is beyond the power of reason to
believe. "
Voltaire <http://www.brainyquote.com/quotes/quotes/v/voltaire163832.html>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20111031/6ee1d465/attachment.html>
More information about the Tutor
mailing list