
June 25, 2022
9:23 a.m.
Chris Angelico writes:
So the only way around it would be to make the defer keyword somehow magical when used in a function signature, which kinda defeats the whole point about being able to reuse another mechanic to achieve this.
The defer keyword is already magical. Overloading it with more magic doesn't bother me. The question of internal consistency of the various magics does bother me.
Also, it would create some other oddity, depending on which way this is handled:
_default = defer [] def foo(cookiejar=_default):
Does this also get the magic, or doesn't it? Either way, there'd be a really weird inconsistency here.
Don't know, need to think about the definition and implementation of the magic first.