Resurrecting PEP 558 (defined semantics for locals())
Hi, PEP 558 seems to be dormant, if not abandoned. There are at least two open issues for bugs resulting from the currently weird and inefficient behavior of `f_locals` and `locals()`. See https://bugs.python.org/issue30744 for an example of undesirable behaviour. PEP 588, or something like it, would fix those. I'd be happy to take over the PEP, or write a new one. I like PEP 588, although I would propose a simplification. The PEP mentions "tracing mode" and changes behavior according to whether a program is in "tracing mode" or not. I'd like to remove this distinction. Cheers, Mark.
Sounds good to me. Have you talked to Nick? On Mon, Jan 25, 2021 at 07:07 Mark Shannon <mark@hotpy.org> wrote:
Hi,
PEP 558 seems to be dormant, if not abandoned.
There are at least two open issues for bugs resulting from the currently weird and inefficient behavior of `f_locals` and `locals()`. See https://bugs.python.org/issue30744 for an example of undesirable behaviour.
PEP 588, or something like it, would fix those.
I'd be happy to take over the PEP, or write a new one. I like PEP 588, although I would propose a simplification.
The PEP mentions "tracing mode" and changes behavior according to whether a program is in "tracing mode" or not. I'd like to remove this distinction.
Cheers, Mark. _______________________________________________ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-leave@python.org https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/TUQOEWQS... Code of Conduct: http://python.org/psf/codeofconduct/
-- --Guido (mobile)
As far as I'm aware, the design is in a potentially acceptable state, I just stalled out completely on the boring bits of finishing the implementation of the write-through proxy: * implement & test the rest of the mutable mapping methods * refactor to properly share code with the odict implementation instead of copying & pasting it So a co-author would definitely be most welcome, given I've been procrastinating on that part for literally years at this point. Cheers, Nick. On Tue, 26 Jan 2021, 1:21 am Guido van Rossum, <guido@python.org> wrote:
Sounds good to me. Have you talked to Nick?
On Mon, Jan 25, 2021 at 07:07 Mark Shannon <mark@hotpy.org> wrote:
Hi,
PEP 558 seems to be dormant, if not abandoned.
There are at least two open issues for bugs resulting from the currently weird and inefficient behavior of `f_locals` and `locals()`. See https://bugs.python.org/issue30744 for an example of undesirable behaviour.
PEP 588, or something like it, would fix those.
I'd be happy to take over the PEP, or write a new one. I like PEP 588, although I would propose a simplification.
The PEP mentions "tracing mode" and changes behavior according to whether a program is in "tracing mode" or not. I'd like to remove this distinction.
Cheers, Mark. _______________________________________________ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-leave@python.org https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/TUQOEWQS... Code of Conduct: http://python.org/psf/codeofconduct/
-- --Guido (mobile)
Note that PEP 558 already doesn't change behaviour in tracing mode any more though - that idea didn't survive the first round of review. Cheers, Nick. On Wed, 27 Jan 2021, 9:58 pm Nick Coghlan, <ncoghlan@gmail.com> wrote:
As far as I'm aware, the design is in a potentially acceptable state, I just stalled out completely on the boring bits of finishing the implementation of the write-through proxy:
* implement & test the rest of the mutable mapping methods * refactor to properly share code with the odict implementation instead of copying & pasting it
So a co-author would definitely be most welcome, given I've been procrastinating on that part for literally years at this point.
Cheers, Nick.
On Tue, 26 Jan 2021, 1:21 am Guido van Rossum, <guido@python.org> wrote:
Sounds good to me. Have you talked to Nick?
On Mon, Jan 25, 2021 at 07:07 Mark Shannon <mark@hotpy.org> wrote:
Hi,
PEP 558 seems to be dormant, if not abandoned.
There are at least two open issues for bugs resulting from the currently weird and inefficient behavior of `f_locals` and `locals()`. See https://bugs.python.org/issue30744 for an example of undesirable behaviour.
PEP 588, or something like it, would fix those.
I'd be happy to take over the PEP, or write a new one. I like PEP 588, although I would propose a simplification.
The PEP mentions "tracing mode" and changes behavior according to whether a program is in "tracing mode" or not. I'd like to remove this distinction.
Cheers, Mark. _______________________________________________ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-leave@python.org https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/TUQOEWQS... Code of Conduct: http://python.org/psf/codeofconduct/
-- --Guido (mobile)
Hmm, I need to review the state of my PEP PRs, as what's in the main repo definitely isn't up to date. The tracing mode distinction should be long gone, but is still mentioned in the text on python.org. Cheers, Nick. On Wed, 27 Jan 2021, 10:03 pm Nick Coghlan, <ncoghlan@gmail.com> wrote:
Note that PEP 558 already doesn't change behaviour in tracing mode any more though - that idea didn't survive the first round of review.
Cheers, Nick.
On Wed, 27 Jan 2021, 9:58 pm Nick Coghlan, <ncoghlan@gmail.com> wrote:
As far as I'm aware, the design is in a potentially acceptable state, I just stalled out completely on the boring bits of finishing the implementation of the write-through proxy:
* implement & test the rest of the mutable mapping methods * refactor to properly share code with the odict implementation instead of copying & pasting it
So a co-author would definitely be most welcome, given I've been procrastinating on that part for literally years at this point.
Cheers, Nick.
On Tue, 26 Jan 2021, 1:21 am Guido van Rossum, <guido@python.org> wrote:
Sounds good to me. Have you talked to Nick?
On Mon, Jan 25, 2021 at 07:07 Mark Shannon <mark@hotpy.org> wrote:
Hi,
PEP 558 seems to be dormant, if not abandoned.
There are at least two open issues for bugs resulting from the currently weird and inefficient behavior of `f_locals` and `locals()`. See https://bugs.python.org/issue30744 for an example of undesirable behaviour.
PEP 588, or something like it, would fix those.
I'd be happy to take over the PEP, or write a new one. I like PEP 588, although I would propose a simplification.
The PEP mentions "tracing mode" and changes behavior according to whether a program is in "tracing mode" or not. I'd like to remove this distinction.
Cheers, Mark. _______________________________________________ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-leave@python.org https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/TUQOEWQS... Code of Conduct: http://python.org/psf/codeofconduct/
-- --Guido (mobile)
On Tue, 26 Jan 2021 at 01:05, Mark Shannon <mark@hotpy.org> wrote:
The PEP mentions "tracing mode" and changes behavior according to whether a program is in "tracing mode" or not. I'd like to remove this distinction.
OK, I've checked the status of things from an actual computer rather than my phone, and it turns out this is just confusing wording on my part: the PEP still makes it sound like the "tracing mode" distinction will persist into the future, even though the actual goal now is to eliminate that distinction. I've made a new PR to the PEP to try to clear that up: https://github.com/python/peps/pull/1783/files Cheers, Nick. -- Nick Coghlan | ncoghlan@gmail.com | Brisbane, Australia
participants (3)
-
Guido van Rossum
-
Mark Shannon
-
Nick Coghlan