1 Dec
2021
1 Dec
'21
5:59 p.m.
On Thu, Dec 2, 2021 at 4:40 AM Barry Scott <barry@barrys-emacs.org> wrote:
On 1 Dec 2021, at 06:16, Chris Angelico <rosuav@gmail.com> wrote: 3) If "yes" to question 1, would you use it for any/all of (a) mutable defaults, (b) referencing things that might have changed, (c) referencing other arguments, (d) something else?
yes (a) What does (b) mean? example please. yes (c)
global_default = 500 def do_thing(timeout=>global_default): ... If the global_default timeout changes between function definition and call, omitting timeout will use the updated global. Similarly, you could say "file=>sys.stdout" and if code elsewhere changes sys.stdout, you'll use that. ChrisA