Skip to content

Commit

Permalink
docs/library/sys.rst: Document implementation.version.releaselevel.
Browse files Browse the repository at this point in the history
Signed-off-by: Jos Verlinde <jos_verlinde@hotmail.com>
  • Loading branch information
Josverl authored and dpgeorge committed Feb 7, 2024
1 parent 781366e commit 2bdaa1b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion docs/library/sys.rst
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,17 @@ Constants
MicroPython, it has following attributes:

* *name* - string "micropython"
* *version* - tuple (major, minor, micro), e.g. (1, 7, 0)
* *version* - tuple (major, minor, micro, releaselevel), e.g. (1, 22, 0, '')
* *_machine* - string describing the underlying machine
* *_mpy* - supported mpy file-format version (optional attribute)

This object is the recommended way to distinguish MicroPython from other
Python implementations (note that it still may not exist in the very
minimal ports).

Starting with version 1.22.0-preview, the fourth node *releaselevel* in
*implementation.version* is either an empty string or ``"preview"``.

.. admonition:: Difference to CPython
:class: attention

Expand Down

0 comments on commit 2bdaa1b

Please sign in to comment.