Hello,

On Tue, 23 Feb 2021 17:52:20 +1100
Chris Angelico <ros...@gmail.com> wrote:

> On Tue, Feb 23, 2021 at 5:33 PM Paul Sokolovsky <pmis...@gmail.com>
> wrote:
> > Because that's the right analogy of what happens with a function -
> > in the function "prolog", there's a series of assignments:
> > "formal_paramX = actual_argX". Conceptually, those *are* in the
> > function context (or you would not be able to reference function's
> > formal params).  
> 
> But they aren't actual lines of code. Your analogy breaks down because
> you're trying to put a line into a backtrace for a mythical and
> conceptual action that happens as part of the function call.

But that's the whole point - the externally visible behavior should
correspond to the conceptual model, even if a particular implementation
does something different underlyingly.

So again, it's CPython's implementation detail that, for bytecode
functions only, it implements:

def foo(params):  # foo takes care of its params
    ...

foo(args)

as:

param_check_and_call(foo, __param_meta__[foo], *args)

And due to this implementation detail raises exceptions from
param_check_and_call().

[]

> The way I see it, this is perfect as an "additional information"
> field.

I started there, and proceeded to where no "additional information"
hacks are needed, and everything fits well into the existing framework.
Come along with me.


[]


-- 
Best regards,
 Paul                          mailto:pmis...@gmail.com
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/CBWMQQYKMOL6JYAESTHFWCJ3Y7H53CDK/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to