summaryrefslogtreecommitdiff
path: root/docs/reference/mpyfiles.rst
diff options
context:
space:
mode:
authorDamien George <damien@micropython.org>2022-04-26 17:23:29 +1000
committerDamien George <damien@micropython.org>2022-04-28 17:23:03 +1000
commit59c5d4161120db28bc6cbc7653f2e7fdb4a87370 (patch)
treead390dc288c563f00d5ec6a43bb1de6f13ff9da4 /docs/reference/mpyfiles.rst
parent40047823bcde4ff97b91fdc19d3d5e8f575e4dde (diff)
py/modsys: Rename sys.implementation.mpy to sys.implementation._mpy.
Per CPython docs, non-standard attributes must begin with an underscore. Signed-off-by: Damien George <damien@micropython.org>
Diffstat (limited to 'docs/reference/mpyfiles.rst')
-rw-r--r--docs/reference/mpyfiles.rst4
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/reference/mpyfiles.rst b/docs/reference/mpyfiles.rst
index 6ba7389cf..9d6388741 100644
--- a/docs/reference/mpyfiles.rst
+++ b/docs/reference/mpyfiles.rst
@@ -44,7 +44,7 @@ Compatibility is based on the following:
loading it must support execution of that architecture's code.
If a MicroPython system supports importing .mpy files then the
-``sys.implementation.mpy`` field will exist and return an integer which
+``sys.implementation._mpy`` field will exist and return an integer which
encodes the version (lower 8 bits), features and native architecture.
Trying to import an .mpy file that fails one of the first four tests will
@@ -58,7 +58,7 @@ If importing an .mpy file fails then try the following:
by executing::
import sys
- sys_mpy = sys.implementation.mpy
+ sys_mpy = sys.implementation._mpy
arch = [None, 'x86', 'x64',
'armv6', 'armv6m', 'armv7m', 'armv7em', 'armv7emsp', 'armv7emdp',
'xtensa', 'xtensawin'][sys_mpy >> 10]