]> granicus.if.org Git - python/commitdiff
bpo-32625: Updated documentation for EXTENDED_ARG. (GH-13985)
authorYao Zuo <laike9m@users.noreply.github.com>
Wed, 12 Jun 2019 03:46:09 +0000 (20:46 -0700)
committerSerhiy Storchaka <storchaka@gmail.com>
Wed, 12 Jun 2019 03:46:09 +0000 (06:46 +0300)
Python 3.6 changed the size of bytecode instruction, while the documentation for `EXTENDED_ARG` was not updated accordingly.

Doc/library/dis.rst

index 2a3ffb5e8271191ff499ebb681dabec9e01af98d..5b79be626626de74995280b85cabbd421e0fb6a9 100644 (file)
@@ -1219,10 +1219,10 @@ All of the following opcodes use their arguments.
 
 .. opcode:: EXTENDED_ARG (ext)
 
-   Prefixes any opcode which has an argument too big to fit into the default two
-   bytes.  *ext* holds two additional bytes which, taken together with the
-   subsequent opcode's argument, comprise a four-byte argument, *ext* being the
-   two most-significant bytes.
+   Prefixes any opcode which has an argument too big to fit into the default one
+   byte. *ext* holds an additional byte which act as higher bits in the argument.
+   For each opcode, at most three prefixal ``EXTENDED_ARG`` are allowed, forming
+   an argument from two-byte to four-byte.
 
 
 .. opcode:: FORMAT_VALUE (flags)