
On Wed, Oct 27, 2021 at 2:05 AM Eric V. Smith <eric@trueblade.com> wrote:
Among my objections to this proposal is introspection: how would that work? The PEP mentions that the text of the expression would be available for introspection, but that doesn't seem very useful.
Doesn't it? It would certainly be useful in help().
At the very least, the PEP needs to talk about inspect.Signature objects, and how they would support these late-bound function arguments. And in particular, how would you create a Signature object that represents a function with such arguments? What would the default values look like? I think Dave Beazley has a talk somewhere where he dynamically creates objects that implement specific Signatures, I'll try to dig it up and produce an example. For me, it's a show-stopper if you can't support this with late-bound arguments.
That's a very good point. I suspect that what will happen is that these args will simply be omitted. It's the only way to ensure that the values are calculated correctly. But I don't (yet) know enough of the details of inspect.Signature to say for sure. ChrisA