On Sun, Oct 31, 2021 at 6:25 PM Steven D'Aprano wrote:
>
> I have a suggestion for the implementation.
>
> I think that Chris' current approach is to compile the late-bound
> defaults in the function body. So if we have a function like this:
>
> def func(a, b=early_expression, @c=late_expressi
On Sun, Oct 31, 2021 at 06:22:09PM +1100, Steven D'Aprano wrote:
[snip]
> Benefits:
If I have understood Chris correctly, there's another benefit. Replacing
the late bound defaults in the function object will no longer be a
misleading no-op that confuses introspection tools such as
inspect.sig