codehaus


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Python-Dev] PEP 558: Defined semantics for locals()


On Wed, 22 May 2019 at 00:51, Nick Coghlan <ncoghlan at gmail.com> wrote:
> P.S. I'm away this weekend, so I expect the reference implementation
> to be done late next week, and I'd be submitting the PEP to Nathaniel
> for formal pronouncement at that point. However, I'm posting this
> thread now so that there's more time for discussion prior to the 3.8b1
> deadline.

I found some time the other day to finish up the core of the reference
implementation and resolve some bugs in the new test cases, so the
essential changes can now be seen in
https://github.com/python/cpython/pull/3640/files

There are still some code level TODO items to cover off a few minor
points in the PEP, as well as to make the fast locals proxy a better
behaved mutable mapping. The proposed documentation changes also still
need to be brought over from the PEP, and at least a quick scan done
through the code comments and the rest of the documentation for now
outdated references to the legacy trace function namespace handling.

However, I think the PR does show that the proposed technique can be
implemented without too much additional code complexity, and will
hopefully be adaptable for all implementations that emulate the frame
API at all.

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia