bpo-29453: Remove reference to undefined dictionary ordering in Tutorial#140
Merged
Mariatta merged 2 commits intopython:masterfrom Feb 21, 2017
DimitrisJim:control_flow_dict
Merged
bpo-29453: Remove reference to undefined dictionary ordering in Tutorial#140Mariatta merged 2 commits intopython:masterfrom DimitrisJim:control_flow_dict
Mariatta merged 2 commits intopython:masterfrom
DimitrisJim:control_flow_dict
Conversation
As of Python 3.6 **kwargs are ordered, thus, remove the paragraph stating that ordering is undefined and change snippet to remove the unecessary sorted call.
Contributor
Author
|
Added a sentence mentioning the guaranteed output order. Should I also make a PR for |
Member
|
Thanks @DimitrisJim |
Member
|
Assigning this to myself per request by @rhettinger http://bugs.python.org/issue29453 |
Contributor
Author
|
Thanks, @Mariatta! |
Mariatta
approved these changes
Feb 21, 2017
Mariatta
pushed a commit
to Mariatta/cpython
that referenced
this pull request
Feb 21, 2017
…ial (pythonGH-140) As of Python 3.6 **kwargs are ordered, thus, remove the paragraph stating that ordering is undefined and change snippet to remove the unecessary sorted call. * Add sentence mentioning guaranteed output order of kwargs (cherry picked from commit 32e8f9b)
akruis
pushed a commit
to akruis/cpython
that referenced
this pull request
Oct 29, 2017
- Initialize variable 'len' in function unwrap_frame_arg(). - Assign to '*valid' in function slp_find_execname(). - Disable GCC warning -Waddress in macro TASKLET_SETVAL(task, val). - Update Stackless/changelog.txt for issues python#138, python#140
akruis
pushed a commit
to akruis/cpython
that referenced
this pull request
Nov 7, 2017
- fix a warning about an unused expression result in ceval.c - fix a warning about a non literal NULL-pointer initialization in prickelpit.c (cherry picked from commit 2b68ad3)
akruis
pushed a commit
to akruis/cpython
that referenced
this pull request
Nov 7, 2017
- remove an unused declaration. (cherry picked from commit e20d523)
akruis
pushed a commit
to akruis/cpython
that referenced
this pull request
Nov 7, 2017
Fix warnings emitted by gcc 7.2. - ceval.c: '*' in boolean context, suggest '&&' instead. - stacklessmodule.c: a misleading indentation (cherry picked from commit c51072e)
akruis
pushed a commit
to akruis/cpython
that referenced
this pull request
Mar 25, 2018
- fix a warning about an unused expression result in ceval.c - fix a warning about a non literal NULL-pointer initialization in prickelpit.c
akruis
pushed a commit
to akruis/cpython
that referenced
this pull request
Mar 25, 2018
- remove an unused declaration.
akruis
pushed a commit
to akruis/cpython
that referenced
this pull request
Mar 25, 2018
Fix warnings emitted by gcc 7.2. - ceval.c: '*' in boolean context, suggest '&&' instead. - stacklessmodule.c: a misleading indentation
akruis
pushed a commit
to akruis/cpython
that referenced
this pull request
Jun 19, 2018
- Assign to '*valid' in function slp_find_execname(). - Disable GCC warning -Waddress in macro TASKLET_SETVAL(task, val). - Update Stackless/changelog.txt for issues python#138, python#140 (cherry picked from commit 3461ccf)
akruis
pushed a commit
to akruis/cpython
that referenced
this pull request
Jun 19, 2018
- remove an unused declaration.
akruis
pushed a commit
to akruis/cpython
that referenced
this pull request
Jun 19, 2018
Fix warnings emitted by gcc 7.2. - stacklessmodule.c: a misleading indentation (cherry picked from commit c51072e)
jaraco
pushed a commit
that referenced
this pull request
Dec 2, 2022
SonicField
added a commit
to SonicField/cpython
that referenced
this pull request
Apr 25, 2026
Per supervisor 21:23:07Z + theologian 21:23:08Z + theologian P7 audit 20:53:51Z. Moves emitAnyCall from PARTIAL Cat-B to PURE-CONVERTED (Phase 3D 98/100 → 99/100). One PARTIAL Cat-B remains: emitLoadMethodStatic (blocked on VTableByteOffset wrapper, landed in push 58). CHANGES: C body (Python/jit/hir/builder_emit_c.c hir_builder_emit_any_call_c): - New signature: drop call_kind/is_kw_arg/is_awaited/const_arg params; add opcode (raw int) and BcByteOffset base_offset (P5 wrapper). - Move opcode→PhxCallKind switch into C body. CALL/CALL_FUNCTION_EX from Include/opcode.h; CALL_FUNCTION/_KW/CALL_KW/CALL_METHOD from Python/jit_common/opcode_stubs.h (stubbed >255 in 3.12 but kept for forward compat). - INVOKE_FUNCTION/NATIVE/METHOD opcode constants local-#define'd in C body (209/216/185 from Python/jit_interp/3.12/cinder_opcode_ids.h). Local-define avoids pulling cinder_opcode.h which would shadow Include/opcode.h's BINARY_OP_ADD_INT and break BINARY_OP specialization #ifdef (per existing comment at builder_emit_c.c:30). Guarded with #ifndef so future direct cinder_opcode_ids.h include doesn't conflict. - is_awaited hardcoded 0 for 3.12 with #if PY_VERSION_HEX guard + #error fallback for older Python (Phoenix targets 3.12 exclusively). Older-Python path would need C-side bc_it/bc_instr accessors (out- of-scope; covered by existing C++ stub history in git log). - const_arg = PyTuple_GET_ITEM(code->co_consts, oparg) for INVOKE_*. Per HIRBuilder::constArg @ builder.cpp pre-conversion: borrowed ref, no GC trigger, no refcount. Lifetime = code object = compile duration. Theologian 20:53:51Z P7 audit confirmed safe to extract on C side. - base_offset.v unwrap at the one boundary (hir_builder_emit_call_method_exception_handler_inline_c, raw-int API). C++ stub (Python/jit/hir/builder.cpp HIRBuilder::emitAnyCall): - Shrinks from 67 lines to 12 lines: pure type marshaling delegation. - Wraps base_offset via bc_byte_offset_from_int factory (Phase A.5). - Added bytecode_c.h include for BcByteOffset visibility. P6 EXECUTION-PATH COVERAGE: - PHX_CALL_KIND_CALL_METHOD (CALL/CALL_METHOD/CALL_KW): EXERCISED by test_exc_raise_catch (CALL ValueError(...)) + 4 W-2A-DISPATCH-COVERAGE sentinels (try/else, try/finally with raise, nested try, raise-in-handler) + 4 W-2B-RECONVERT sentinels (raise/catch, BINARY_SUBSCR_DICT-in-try, continue-in-loop, multi-except-in-loop) + test_multiple_exceptions_in_loop. - PHX_CALL_KIND_CALL_EX (CALL_FUNCTION_EX): EXERCISED indirectly by any test using *args/**kwargs unpacking; covered by Phoenix CPython suite. - PHX_CALL_KIND_VECTOR_CALL (CALL_FUNCTION/_KW): DEAD in 3.12 (stubbed >255). Switch case kept for forward compat with older Python builds. - PHX_CALL_KIND_INVOKE_FUNCTION/NATIVE/METHOD: COVERAGE GAP. INVOKE_* opcodes are Cinder static-Python only; vanilla CPython 3.12 compiler does NOT emit them. Pure Python sentinel cannot exercise these branches without Cinder static-Python infrastructure (not available in this build per theologian 21:32:27Z + supervisor 21:32:42Z fallback). Conversion is mechanical (PyTuple_GET_ITEM extraction + delegate to existing emit functions); structural test exists at Lib/test/test_phoenix_partial_conversions.py:52. Execution-level coverage queued as W-CINDERX-INVOKE-COVERAGE workstream (cinderx_dev integration post-Phoenix-integration). Phase 0' HIR-DIFF planned (theologian step 4): test_exc_raise_catch + 4 W-2A sentinels + Phoenix suite — pre/post conversion HIR comparison to detect any divergence. Verification pending: testkeeper rebuild + 30x all 8 W-2A+W-2B-RECONVERT sentinels + 30x test_multiple_exceptions_in_loop + Phoenix suite + ABBA + dual-arch. Per supervisor 21:32:42Z (post pythia python#140 python#2): full 24-bench ABBA between push 59 (this) and push 60 (emitLoadMethodStatic conversion) — single-commit bisect window for cap-clock at 73 commits since last 24-bench (cbb9453 2026-04-23).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As of Python 3.6 **kwargs are ordered, thus, remove the paragraph stating that
ordering is undefined and change snippet to remove the unnecessary sorted call.
Only issue that might need addressing as raised on the tracker is, if it is worth to mention that the output corresponds to the order of passed keyword arguments.
(Though this was already present with a patch on b.p.o I decided to turn it in a pull request since, I believe, it makes it easier to check and apply now that things are on Github)