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

14:58
heyyyyyyyyyyyyy
1 message moved from Python
 
3 hours later…
18:28
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?
18:43
4 messages moved from Python

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