This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Documentation for EXTENDED_ARG in dis module is incorrect for >=3.6
Type: Stage: resolved
Components: Documentation Versions: Python 3.8, Python 3.7, Python 3.6
process
Status: closed Resolution: duplicate
Dependencies: Superseder:
Assigned To: docs@python Nosy List: Eric Appelt, docs@python, serhiy.storchaka
Priority: normal Keywords:

Created on 2018-03-19 16:21 by Eric Appelt, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (3)
msg314100 - (view) Author: Eric Appelt (Eric Appelt) * Date: 2018-03-19 16:21
The documentation for the EXTENDED_ARG instruction in the dis module documentation refers to the way the opcode worked before 3.6: https://docs.python.org/3.6/library/dis.html#opcode-EXTENDED_ARG

As I understand, since moving to 2-byte wordcode in 3.6, each EXTENDED_ARG effectively adds a byte to the argument of the next instruction and they can be chained to allow up to a 32-bit argument. The current documentation refers the 2-byte arguments from the older bytecode used in 3.5 and below.

I'm trying to think of a clear and concise wording for how it works now and will add a PR to fix this issue unless someone gets to it before me.
msg314101 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2018-03-19 16:27
Isn't this a duplicate of issue32625?
msg314107 - (view) Author: Eric Appelt (Eric Appelt) * Date: 2018-03-19 18:09
Yes, thanks. I failed to see the duplicate searching for open issues, closing.
History
Date User Action Args
2022-04-11 14:58:58adminsetgithub: 77285
2018-03-19 18:09:55Eric Appeltsetstatus: open -> closed
resolution: duplicate
messages: + msg314107

stage: resolved
2018-03-19 16:27:26serhiy.storchakasetnosy: + serhiy.storchaka
messages: + msg314101
2018-03-19 16:21:06Eric Appeltcreate