News for hackers. Stuff that matters.
Re:Reasons Python Sucks by pdonis on Wednesday December 19, 2018 @11:50AM (#18716974)
> Your main point (now that you have shifted the goalposts) seems to be that argument passing induces a binding of the parameter name to the argument value, yes?

It's that there is an extra step involved that does not occur in languages like C.

> those bindings do not involve dictionaries as you seem to think

For positional arguments, you are correct. But, as you note, there is still an extra memory allocation on the heap, because the stack at the Python level uses heap memory, not stack memory, at the C level.

For keyword arguments, as you agree, there is a dictionary entry created.

> Local variables are exactly what you claimed they were not

More precisely, local variables inside a function that correspond to positional arguments are, for performance reasons, stored in an array of function local pointers at the C level, instead of being stored as dictionary entries (namespace bindings).

But the fact that this is a particular exception to Python's normal treatment of variables simply highlights the point I was making.

There are no comments on this comment yet.