[sf-lug] [PYCLASS] Session 3: Monday Oct 6

jim jim at well.com
Sat Oct 4 15:21:01 PDT 2008


   i don't think it ever will be. 
   each function call resolves to the value 
it returns (my sloppy example did not include 
an explicit return statement in the function 
body, i can't remember if the chapters 
included that info). 
   assuming "la la la" includes a return 
statement, do_twice(6,3) would return 216, 
do_twice(6,2) would return 36, do_once(6) 
would return 6, all while the interpreter 
was still working on the statement: the 
values would remain while the addition 
operation was resolved, then the sum would 
be assigned to answer. 


On Sat, 2008-10-04 at 14:49 -0700, Alex Kleider wrote:
> 
> a_kleider at yahoo.com
> 
> 
> --- On Sat, 10/4/08, jim <jim at well.com> wrote:
> 
> > not necessarily. write the functions 
> > (at top) then call them as you need them 
> > for each specific arithmetic requirement. 
> >    how elegantly to combine the results 
> > of multiple calls for a single arithmetic 
> > result seems elusive: i don't like the 
> > summing idea, though i can't say why 
> > (probably gut feel desire for a single 
> > does_all() function call). 
> > 
> > def do_twice(value, recdepth): 
> >     # la la la 
> 
> 
> Has the following syntax ( "adding" function calls) been introduced yet?
> 
> 
> > 
> > answer = do_twice(6,3) + do_twice(6,2) + do_once(6) 
> > 
> > 
> 
> 
> 
> 
>       
> 
> _______________________________________________
> sf-lug mailing list
> sf-lug at linuxmafia.com
> http://linuxmafia.com/mailman/listinfo/sf-lug
> 





More information about the sf-lug mailing list