[Tutor] Tutor Digest, Vol 92, Issue 128

bob gailer bgailer at gmail.com
Mon Oct 31 23:48:55 CET 2011


On 10/31/2011 1:26 PM, Asokan Pichai wrote:
> 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

None is returned, not nothing.
> 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>
>
>
>
>
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> To unsubscribe or change subscription options:
> http://mail.python.org/mailman/listinfo/tutor


-- 
Bob Gailer
919-636-4239
Chapel Hill NC

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20111031/cef439f3/attachment.html>


More information about the Tutor mailing list