Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion docs/library/sys.rst
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,16 @@ 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 4th node *releaselevel* in *implementation.version* is either an empty string or *'preview'*

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

Expand Down