summaryrefslogtreecommitdiff
path: root/docs/library/sys.rst
diff options
context:
space:
mode:
Diffstat (limited to 'docs/library/sys.rst')
-rw-r--r--docs/library/sys.rst20
1 files changed, 10 insertions, 10 deletions
diff --git a/docs/library/sys.rst b/docs/library/sys.rst
index 1d7579754..09054becc 100644
--- a/docs/library/sys.rst
+++ b/docs/library/sys.rst
@@ -10,13 +10,13 @@ Functions
.. function:: exit(retval=0)
Terminate current program with a given exit code. Underlyingly, this
- function raise as ``SystemExit`` exception. If an argument is given, its
- value given as an argument to ``SystemExit``.
+ function raise as `SystemExit` exception. If an argument is given, its
+ value given as an argument to `SystemExit`.
.. function:: print_exception(exc, file=sys.stdout)
- Print exception with a traceback to a file-like object `file` (or
- ``sys.stdout`` by default).
+ Print exception with a traceback to a file-like object *file* (or
+ `sys.stdout` by default).
.. admonition:: Difference to CPython
:class: attention
@@ -24,7 +24,7 @@ Functions
This is simplified version of a function which appears in the
``traceback`` module in CPython. Unlike ``traceback.print_exception()``,
this function takes just exception value instead of exception type,
- exception value, and traceback object; `file` argument should be
+ exception value, and traceback object; *file* argument should be
positional; further arguments are not supported. CPython-compatible
``traceback`` module can be found in micropython-lib.
@@ -37,15 +37,15 @@ Constants
.. data:: byteorder
- The byte order of the system ("little" or "big").
+ The byte order of the system (``"little"`` or ``"big"``).
.. data:: implementation
Object with information about the current Python implementation. For
MicroPython, it has following attributes:
- * `name` - string "micropython"
- * `version` - tuple (major, minor, micro), e.g. (1, 7, 0)
+ * *name* - string "micropython"
+ * *version* - tuple (major, minor, micro), e.g. (1, 7, 0)
This object is the recommended way to distinguish MicroPython from other
Python implementations (note that it still may not exist in the very
@@ -95,10 +95,10 @@ Constants
The platform that MicroPython is running on. For OS/RTOS ports, this is
usually an identifier of the OS, e.g. ``"linux"``. For baremetal ports it
- is an identifier of a board, e.g. "pyboard" for the original MicroPython
+ is an identifier of a board, e.g. ``"pyboard"`` for the original MicroPython
reference board. It thus can be used to distinguish one board from another.
If you need to check whether your program runs on MicroPython (vs other
- Python implementation), use ``sys.implementation`` instead.
+ Python implementation), use `sys.implementation` instead.
.. data:: stderr