Commit Graph

11 Commits

Author SHA1 Message Date
Nick Coghlan 933fbf8626
PEP 558: Note compatibility constraints on locals(), other updates (#1069)
- new design discussion section to cover the requirement that the
  semantics of locals() itself at function scope be left alone
- propose a C level API that exactly matches Python level
  frame.f_locals semantics
- other minor text formatting and wording updates
2019-05-21 23:43:15 +10:00
Nick Coghlan 44f2986f8d
PEP 558: Remove dynamic frame semantics proposal (#1051)
Changing the frame API semantics based on whether or not a
tracing function is active is tricky to implement and hard
to document clearly, so this simplifies the proposal by
instead having the frame API always expose a write-through
proxy at function scope, and restricting the dynamic
snapshot behaviour to the locals() builtin.
2019-05-21 22:41:34 +10:00
Nick Coghlan 1b5d22cf78
PEP 558: Appoint BDFL-Delegate and other updates (#1008)
Also adds a link to the in-development reference implementation,
and makes the dynamic frame.f_locals behaviour an open question.
2019-04-24 09:04:37 +10:00
Nick Coghlan 4d9406ca17 PEP 558: Use correct function name 2017-10-22 16:22:13 +10:00
Nick Coghlan 5bf527ba1a PEP 558: markup fix 2017-10-22 16:18:56 +10:00
Nick Coghlan 9a8e590a52 PEP 558: Update to use a write-through proxy
It turns out that *any* write-back based design has
inherent flaws that make it difficult to build a source
debugger that reliably allows mutation of function local
variables.

So this switches to Nathaniel's suggested write-through
proxy idea, but constrains it to only applying when a
trace hook is installed. This means the official language
level semantics can just use the simpler model where
rebinding function local variables via locals() simply
isn't possible - only folks already working with frames
and trace functions will need to be aware of the semantics
of the write-through proxy.
2017-10-22 16:12:25 +10:00
Nick Coghlan 82e7688a22 PEP 558: Simplify the proposed locals() changes
We should be able to resolve the reported problems just
by changing how trace hooks work, rather than making
any fundamental changes to locals() or frame.f_locals.
2017-09-17 17:40:13 +10:00
Nick Coghlan 94e6606edb PEP 558: Update for conversation with Guido
- new open questions around how storage and updates
  will work
- note that we definitely *don't* want to return the
  write-through proxy from locals() at function scope
2017-09-08 16:14:04 -07:00
Guido van Rossum c04dd529ad Clarify bullets for Function scope (#403)
* Clarify bullets for Function scope

* fix backticks
2017-09-09 08:42:12 +10:00
Nick Coghlan 51fae75f34 PEP 558: add missing word 2017-09-08 14:58:29 -07:00
Nick Coghlan 6ac5975fdb PEP 558: Defined semantics for locals() 2017-09-08 14:55:50 -07:00