Uh oh!
There was an error while loading. Please reload this page.
PEP 705: Simplify and clarify proposal - #3504
Conversation
5b38342 to
0a7bdc4CompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
0a7bdc4 to
1304dc7Compare1304dc7 to
d304a08Compare
erictraut
left a comment
There was a problem hiding this comment.
Current changes look good to me — at least sufficient for getting another round of feedback from the broader typing community.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
I believe the typeshed is not *unsound* here, merely stricter than necessary. Consensus is that PEPs should dictate the typeshed only, and I think this is best left to a separate PEP.
Typecheckers are always permitted to widen what they support beyond what the typeshed dictates, e.g. to specify that `c: C = a | b` and `d: D = copy(a)` should match the equivalent expressions `c: C = {**a, **b}` and `d: D = {**a}`Re-requesting review as I have made significant changes: the sections on merge and copy/deepcopy have been removed, with explanation on Rejected Alternatives. |
erictraut
left a comment
There was a problem hiding this comment.
I added a couple of minor comments, but I think this draft is looking really good!
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
alicederyn
commented
Oct 23, 2023
Admin question: when this merges, should I continue to use the existing discussion thread on typing-sig, and just post an update? Or should I open a new one? |
JelleZijlstra
commented
Oct 23, 2023
I think you should continue the existing thread. Not sure we have firm guidelines, but I would only start a new thread if the proposal becomes radically different or the thread has become very long. |
Uh oh!
There was an error while loading. Please reload this page.
Address feedback from @erictraut, plus fix issues I spotted in the process:
readonly=Trueappears to be more confusing than expected, and is not strictly necessary, so remove it (see Rejected Alternatives for more)There is no explicit name given in the Python docs ford1 | d2, but "merge" is clearer than "union", which is used for setsThe merge section incorrectly required consistency betweenAandC, even if the value inAcould never end up inCdue to it being required inBThe merge section incorrectly allowed keys to be missed offAandBin a way that could allow unsound typingother_keysis no longer an option for safe updates to TypedDicts with read-only entries, highlight that updates are safe if the bottom type is used to explicitly exclude a key, and require type checker supportcopyanddeepcopywere mentioned as having similar behaviour to merge, but it was not clear if this was intended to change how type checkers behave; add a new section explicitly laying out how copy and deepcopy should work for TypedDicts, so this can be discussed📚 Documentation preview 📚: https://pep-previews--3504.org.readthedocs.build/