summaryrefslogtreecommitdiffstats
path: root/Doc/library/dis.rst
Commit message (Collapse)AuthorAgeFilesLines
* [3.10] gh-71316: Update dis documentation to include changes to jump ↵Christopher Chianelli2022-10-071-0/+4
| | | | | | | arguments (GH-95798). (GH-98029) (cherry picked from commit 6592a62ec2939323b895c85780da7fd73a640da3) Co-authored-by: Christopher Chianelli <cchianel@redhat.com>
* gh-89038: [doc] update dis.findlinestarts documentation for changes related ↵Miss Islington (bot)2022-06-301-4/+6
| | | | | | | | | to PEP-626 (GH-94247) (GH-94449) (cherry picked from commit d68f2d27bbf85f3573a08fc7554889e1733a30f0) Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com> Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
* gh-70474: [doc] fix wording of GET_ANEXT doc (GH-94048)Miss Islington (bot)2022-06-251-2/+2
| | | | | (cherry picked from commit 9af6b75298d066e89646acf8df1704bef183a6f8) Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
* [3.10] bpo-46009: Do not exhaust generator when send() method raises ↵Mark Shannon2021-12-081-3/+2
| | | | | | | | | | | | (GH-29986). (GH-29988) * [3.10] bpo-46009: Do not exhaust generator when send() method raises (GH-29986). (cherry picked from commit 69806b9516dbe092381f3ef884c7c64bb9b8414a) Co-authored-by: Mark Shannon <mark@hotpy.org> * Rename variable after cherry-pick. * Add NULL check.
* bpo-43977: Properly update the tp_flags of existing subclasses when their ↵Miss Islington (bot)2021-06-251-5/+8
| | | | | | | parents are registered (GH-26864) (cherry picked from commit ca2009d72a52a98bf43aafa9ad270a4fcfabfc89) Co-authored-by: Brandt Bucher <brandt@python.org>
* bpo-43754: Eliminate bindings for partial pattern matches (GH-25229)Brandt Bucher2021-05-021-0/+9
|
* bpo-43683: Handle generator entry in bytecode (GH-25138)Mark Shannon2021-04-061-0/+8
| | | | | | * Handle check for sending None to starting generator and coroutine into bytecode. * Document new bytecode and make it fail gracefully if mis-compiled.
* bpo-42128: Structural Pattern Matching (PEP 634) (GH-22917)Brandt Bucher2021-02-261-0/+56
| | | | | Co-authored-by: Guido van Rossum <guido@python.org> Co-authored-by: Talin <viridia@gmail.com> Co-authored-by: Pablo Galindo <pablogsal@gmail.com>
* Fix typo in dis module doc (GH-24509)Irit Katriel2021-02-201-1/+1
|
* bpo-33387: update documentation for exception handling opcode changes (GH-24334)Irit Katriel2021-01-261-1/+1
| | | | | * bpo-33387: remove obsolete comment * bpo-33387: update SETUP_WITH opcode documentation
* bpo-42246: Make sure that `f_lasti`, and thus `f_lineno`, is set correctly ↵Mark Shannon2020-12-171-1/+2
| | | | | | | | | after raising or reraising an exception (GH-23803) * Ensure that f_lasti is set correctly after an exception is raised to conform to PEP 626. * Update importlib * Add NEWS.
* Fix dis markup (GH-23524)Andre Delfino2020-11-281-6/+6
|
* bpo-42202: Store func annotations as a tuple (GH-23316)Yurii Karabas2020-11-251-1/+3
| | | | | | | | | | | | | Reduce memory footprint and improve performance of loading modules having many func annotations. >>> sys.getsizeof({"a":"int","b":"int","return":"int"}) 232 >>> sys.getsizeof(("a","int","b","int","return","int")) 88 The tuple is converted into dict on the fly when `func.__annotations__` is accessed first. Co-authored-by: Serhiy Storchaka <storchaka@gmail.com> Co-authored-by: Inada Naoki <songofacandy@gmail.com>
* Fix `List_Append` description, list is extracted at TOS1[-i] (GH-21465)Xiang Zhang2020-07-281-1/+1
|
* Improved documentation for `BUILD_CONST_KEY_MAP` (GH-19454)laike9m2020-04-131-3/+3
|
* bpo-40122: Updated documentation for dis.findlabels() (GH-19274)laike9m2020-04-031-1/+1
|
* Updated documentation for FOR_ITER (GH-19113)laike9m2020-03-241-1/+1
| | | Added a comma to make the sentence less confusing.
* bpo-39677: dis: rename the operand of MAKE_FUNCTION from `argc` to `flags` ↵Taine Zhao2020-03-141-1/+1
| | | | for 3.6+ (GC-18550)
* bpo-39320: Handle unpacking of **values in compiler (GH-18141)Mark Shannon2020-01-271-14/+7
| | | | | | | | | | | | | * Add DICT_UPDATE and DICT_MERGE bytecodes. Use them for ** unpacking. * Remove BUILD_MAP_UNPACK and BUILD_MAP_UNPACK_WITH_CALL, as they are now unused. * Update magic number for ** unpacking opcodes. * Update dis.rst to incorporate new bytecodes. * Add blurb entry.
* bpo-39320: Handle unpacking of *values in compiler (GH-17984)Mark Shannon2020-01-231-28/+9
| | | | | | | | * Add three new bytecodes: LIST_TO_TUPLE, LIST_EXTEND, SET_UPDATE. Use them to implement star unpacking expressions. * Remove four bytecodes BUILD_LIST_UNPACK, BUILD_TUPLE_UNPACK, BUILD_SET_UNPACK and BUILD_TUPLE_UNPACK_WITH_CALL opcodes as they are now unused. * Update magic number and dis.rst for new bytecodes.
* improve the documentation of the LOAD_METHOD and CALL_METHOD (GH-18079)Carl Friedrich Bolz-Tereick2020-01-211-8/+10
|
* bpo-39156: Break up COMPARE_OP into four logically distinct opcodes. (GH-17754)Mark Shannon2020-01-141-0/+21
| | | | | | | | Break up COMPARE_OP into four logically distinct opcodes: * COMPARE_OP for rich comparisons * IS_OP for 'is' and 'is not' tests * CONTAINS_OP for 'in' and 'is not' tests * JUMP_IF_NOT_EXC_MATCH for checking exceptions in 'try-except' statements.
* Correct release version to 3.9 for RERAISE and WITH_EXCEPT_START bytecodes. ↵Mark Shannon2019-11-211-2/+2
| | | | | | | (#17318) bpo-33387 Corrects commit fee5526
* Produce cleaner bytecode for 'with' and 'async with' by generating separate ↵Mark Shannon2019-11-211-76/+9
| | | | | | code for normal and exceptional paths. (#6641) Remove BEGIN_FINALLY, END_FINALLY, CALL_FINALLY and POP_FINALLY bytecodes. Implement finally blocks by code duplication. Reimplement frame.lineno setter using line numbers rather than bytecode offsets.
* bpo-34880: Add the LOAD_ASSERTION_ERROR opcode. (GH-15073)Zackery Spytz2019-08-251-0/+8
| | | | Fix assert statement misbehavior if AssertionError is shadowed.
* bpo-37540: vectorcall: keyword names must be strings (GH-14682)Jeroen Demeyer2019-08-161-2/+4
| | | | | | | | The fact that keyword names are strings is now part of the vectorcall and `METH_FASTCALL` protocols. The biggest concrete change is that `_PyStack_UnpackDict` now checks that and raises `TypeError` if not. CC @markshannon @vstinner https://bugs.python.org/issue37540
* bpo-35224: Reverse evaluation order of key: value in dict comprehensions ↵Jörn Heissler2019-06-221-1/+3
| | | | | | | | | | | (GH-14139) … as proposed in PEP 572; key is now evaluated before value. https://bugs.python.org/issue35224
* bpo-32625: Updated documentation for EXTENDED_ARG. (GH-13985)Yao Zuo2019-06-121-4/+4
| | | Python 3.6 changed the size of bytecode instruction, while the documentation for `EXTENDED_ARG` was not updated accordingly.
* Fix typos in docs and docstrings (GH-13745)Xtreak2019-06-021-1/+1
|
* bpo-19184: Update the documentation of dis module. (GH-13652)Michele Angrisano2019-06-021-3/+7
| | | | | | | | | | | | | | | * bpo-19184: Update the documentation of dis module * Explain the behavior of the number of arguments of RAISE_VARGARGS opcode. * bpo-19184: Update blurb. * bpo-19184: Fix typo in the dis Documentation. * bpo-19184: Address review comments and improve the doc * bpo-19184: Remove news file.
* bpo-34906: Doc: Fix typos (GH-9712)Stéphane Wirtel2018-10-051-1/+1
|
* bpo-32455: Add jump parameter to dis.stack_effect(). (GH-6610)Serhiy Storchaka2018-09-181-1/+10
| | | | Add C API function PyCompile_OpcodeStackEffectWithJump().
* bpo-33216: Improve the documentation for CALL_FUNCTION_* (GH-8338) (GH-8784)Serhiy Storchaka2018-09-171-26/+34
|
* bpo-33041: Rework compiling an "async for" loop. (#6142)Serhiy Storchaka2018-03-231-0/+11
| | | | | | | | * Added new opcode END_ASYNC_FOR. * Setting global StopAsyncIteration no longer breaks "async for" loops. * Jumping into an "async for" loop is now disabled. * Jumping out of an "async for" loop no longer corrupts the stack. * Simplify the compiler.
* bpo-32489: Allow 'continue' in 'finally' clause. (GH-5822)Serhiy Storchaka2018-03-181-2/+2
|
* bpo-17611. Move unwinding of stack for "pseudo exceptions" from interpreter ↵Serhiy Storchaka2018-02-221-43/+77
| | | | | | | | | to compiler. (GH-5006) Co-authored-by: Mark Shannon <mark@hotpy.org> Co-authored-by: Antoine Pitrou <antoine@python.org>
* bpo-32565: Add missed versionadded directives for all new opcodes. (#5199)Serhiy Storchaka2018-02-011-0/+31
|
* bpo-32550. Remove the STORE_ANNOTATION bytecode. (GH-5181)Mark Shannon2018-01-301-7/+0
|
* [Doc] Update opcode for var-positional arguments (#4446)Moses Koledoye2017-11-181-1/+1
| | | `BUILD_MAP_UNPACK_WITH_CALL` was duplicated as the opcode for both var-positional and var-keyword arguments. The opcode for the former was updated as `BUILD_TUPLE_UNPACK_WITH_CALL`.
* bpo-31709: Update importlib magic (#3906)Yury Selivanov2017-10-061-2/+5
|
* bpo-31183: `dis` now handles coroutines & async generators (GH-3077)syncosmic2017-08-181-9/+21
| | | | | | | | | | | | | | Coroutines and async generators use a distinct attribute name for their code objects, so this updates the `dis` module to correctly disassemble objects with those attributes. Due to the increase in the test module length, it also fixes some latent defects in the tests related to how the displayed source line numbers are extracted. https://bugs.python.org/issue31230 is a follow-up issue suggesting we may want to solve this a different way, by instead giving all these object types a common `__code__` attribute, avoiding the need for special casing in the `dis` module.
* bpo-11822: Improve disassembly to show embedded code objects. (#1844)Serhiy Storchaka2017-06-111-2/+11
| | | The depth argument limits recursion.
* bpo-28810: Document remaining bytecode changes in 3.6 (GH-651)Ivan Levkivskyi2017-03-241-2/+16
|
* bpo-28810: Document changes to CALL_FUNCTION opcodes (GH-250)Ivan Levkivskyi2017-03-101-31/+40
|
* bpo-28810: Document BUILD_TUPLE_UNPACK_WITH_CALL bytecode added in 3.6 (GH-239)Ivan Levkivskyi2017-03-101-4/+15
|
* bpo-26213: Document _UNPACK bytecodes and BUILD_MAP changes (#238)Ivan Levkivskyi2017-03-031-2/+53
|
* Issue #26110: Add document for LOAD_METHOD and CALL_METHOD opcode.INADA Naoki2017-01-161-0/+22
| | | | Changed stack layout bit for "easy to explain."
* Issue #19795: Mark up None as literal text.Serhiy Storchaka2016-10-191-5/+5
|\
| * Issue #19795: Mark up None as literal text.Serhiy Storchaka2016-10-191-5/+5
| |
* | Issue #28394: More typo fixes for 3.6+Martin Panter2016-10-101-1/+1
| |