« first day (2204 days earlier)      last day (1137 days later) » 

2:58 PM
heyyyyyyyyyyyyy
 
1 message moved from Python
 
 
3 hours later…
6:28 PM
0
Q: How to force recalculation of dependent parameter values in function argument when non-default dependency is passed?

zabopLet's say I have 3 variables & a function func: a=1;b=1;c=1 def func(a=a,b=b,c=b/a): print(a,b,c) To my surprise, func(b=2) produces an output: 1 2 1.0 Why is c not b/a, ie not 2/1=2? How can I make the function recalculate the c when called, if either non-default a or b (ie either of them ...

here it is
but I don't think this question title summarises the issue well
any suggestions how to title the question in a better way?
 
6:43 PM
4 messages moved from Python
 

« first day (2204 days earlier)      last day (1137 days later) »