Return statement question

Gregoire Welraeds greg at perceval.be
Tue Mar 14 18:05:41 EST 2000


In reply to the message of Thomas Lane sent on Mar 14 (see below) :

> Are you sure func3 was never executed? I cut your code (modified to print stuff
> to the screen) and it definitely ran func3.
You are right. It must be something else in my code but I can't find what
and I get no error message...
I'll keep going on searching.


--
Life is not fair
But the root password helps
--

Gregoire Welraeds
greg at perceval.be
Perceval Development team
-------------------------------------------------------------------------------
Perceval Technologies sa/nv	Tel: +32-2-6409194		
Rue Tenbosch, 9			Fax: +32-2-6403154		
B-1000 Brussels			general information:   info at perceval.net
BELGIUM				technical information: helpdesk at perceval.net
URL: http://www.perceval.be/
-------------------------------------------------------------------------------

On Tue, 14 Mar 2000, Thomas Lane wrote:

> Date: Tue, 14 Mar 2000 15:25:03 -0700
> From: Thomas Lane <tom at parlant.com>
> To: python-list at python.org
> Newsgroups: comp.lang.python
> Subject: Re: Return statement question
> 
> Are you sure func3 was never executed? I cut your code (modified to print stuff
> to the screen) and it definitely ran func3.
> 
> Here's the code I ran:
> 
> def func1():
>     print 'func1'
> 
> def func2():
>     print 'func2'
>     return 1
> 
> def func3(sv):
>     print 'func3'
> 
> func1()
> val= func2()
> func3(val)
> 
> The output (as expected) was:
> 
> func1
> func2
> func3
> 
> -Tom
> 
> Gregoire Welraeds wrote:
> > 
> > 
> > In this cas func3 is never executed...
> > 
> > why ?
> >
> -- 
> http://www.python.org/mailman/listinfo/python-list
> 
> 





More information about the Python-list mailing list