How "return" no return ?

Tim Williams listserver at tdw.net
Thu May 12 12:11:20 EDT 2005


----- Original Message ----- 
From: "Corrado Gioannini" <gioco at nekhem.com>


> On Thu, May 12, 2005 at 04:42:34PM +0100, Tim Williams wrote:
> > Just don't use a return statement at all,  or do something like
> > 
> > [function body]
> > if not val = None:
> >     return val
> > [end of function]
> 
> i didn't understood that.
> if you don't return nothing explicitly the function returns None.
> (or am i wrong?)

No, you're right,  my bad :)

Was thinking about something else similar and got stuck in a mindset





More information about the Python-list mailing list