My first impression is that this sounds like a nice simplifcation. One question is how expensive this is for the common case. Right now arguments are pushed on the interpreter stack before CALL_FUNCTION is executed, which is just a pointer assignment. The pointers on the stack are then assigned into the fast locals of the function after the call. Your scheme sounds like it would increase all function calls by the cost of a tuple allocation. It certainly wouldn't hurt to implement this, as it would provide some practical implementation experience that would inform a PEP on the subject. On a related note, I have proposed a pep to add nested lexical scopes for Python 2.1. Barry's away for the moment, so it hasn't been assigned a number yet. It's just a proposal, not sure what Guido will say in the end, but it also involves revising the function call architecture. I'll send a copy of the current draft (just notes) under a separate subject. Jeremy
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4