From 4827502b98ed30e709e59129f8905beae46429a3 Mon Sep 17 00:00:00 2001 From: Alec Delaney <89490472+tekktrik@users.noreply.github.com> Date: Thu, 12 May 2022 13:05:27 -0400 Subject: [PATCH] Add additional builtins, links to CPython documentation --- docs/library/builtins.rst | 46 +++++++++++++++++++++++++++++++++++---- 1 file changed, 42 insertions(+), 4 deletions(-) diff --git a/docs/library/builtins.rst b/docs/library/builtins.rst index 8532dc2531..678bb2763d 100644 --- a/docs/library/builtins.rst +++ b/docs/library/builtins.rst @@ -4,11 +4,18 @@ All builtin functions and exceptions are described here. They are also available via ``builtins`` module. +For more information about built-ins, see the following CPython documentation: + +* `Builtin CPython Functions `_ +* `Builtin CPython Exceptions `_ +* `Builtin CPython Constants `_ + +.. note:: Not all of these functions, types, exceptions, and constants are turned + on in all CircuitPython ports, for space reasons. + Functions and types ------------------- -Not all of these functions and types are turned on in all CircuitPython ports, for space reasons. - .. function:: abs() .. function:: all() @@ -160,33 +167,57 @@ Not all of these functions and types are turned on in all CircuitPython ports, f Exceptions ---------- +.. exception:: ArithmeticError + .. exception:: AssertionError .. exception:: AttributeError +.. exception:: BaseException + +.. exception:: BrokenPipeError + +.. exception:: ConnectionError + +.. exception:: EOFError + .. exception:: Exception .. exception:: ImportError +.. exception:: IndentationError + .. exception:: IndexError .. exception:: KeyboardInterrupt .. exception:: KeyError +.. exception:: LookupError + .. exception:: MemoryError +.. exception:: MpyError + + Not a part of the CPython standard library + .. exception:: NameError .. exception:: NotImplementedError .. exception:: OSError +.. exception:: OverflowError + .. exception:: RuntimeError .. exception:: ReloadException `ReloadException` is used internally to deal with soft restarts. + + Not a part of the CPython standard library + +.. exception:: StopAsyncIteration .. exception:: StopIteration @@ -194,12 +225,19 @@ Exceptions .. exception:: SystemExit - |see_cpython| :py:class:`cpython:SystemExit`. +.. exception:: TimeoutError .. exception:: TypeError - |see_cpython| :py:class:`cpython:TypeError`. +.. exception:: UnicodeError .. exception:: ValueError .. exception:: ZeroDivisionError + +Constants +--------- + +.. data:: Ellipsis + +.. data:: NotImplemented