builtins – builtin functions and exceptions
builtins – builtin functions and exceptions
All builtin functions and exceptions are described here. They are also
available via builtins module.
Functions and types
abs
abs()all
all()any
any()bin
bin()bool
class boolbytearray
class bytearraybytes
class bytesSee CPython documentation: bytes.
callable
callable()chr
chr()classmethod
classmethod()compile
compile()complex
class complexdelattr
delattr(obj, name)The argument name should be a string, and this function deletes the named attribute from the object given by obj.
dict
class dictdir
dir()divmod
divmod()enumerate
enumerate()eval
eval()exec
exec()filter
filter()float
class floatfrozenset
class frozensetgetattr
getattr()globals
globals()hasattr
hasattr()hash
hash()hex
hex()id
id()input
input()int
class intfrom_bytes
classmethod from_bytes(bytes, byteorder)In MicroPython, byteorder parameter must be positional (this is compatible with CPython).
to_bytes
to_bytes(size, byteorder)In MicroPython, byteorder parameter must be positional (this is compatible with CPython).
isinstance
isinstance()issubclass
issubclass()iter
iter()len
len()list
class listlocals
locals()map
map()max
max()memoryview
class memoryviewmin
min()next
next()object
class objectoct
oct()open
open()ord
ord()pow
pow()print()property
property()range
range()repr
repr()reversed
reversed()round
round()set
class setsetattr
setattr()slice
class sliceThe slice builtin is the type that slice objects have.
sorted
sorted()staticmethod
staticmethod()str
class strsum
sum()super
super()tuple
class tupletype
type()zip
zip()Exceptions
AssertionError
exception AssertionErrorAttributeError
exception AttributeErrorException
exception ExceptionImportError
exception ImportErrorIndexError
exception IndexErrorKeyboardInterrupt
exception KeyboardInterruptKeyError
exception KeyErrorMemoryError
exception MemoryErrorNameError
exception NameErrorNotImplementedError
exception NotImplementedErrorOSError
exception OSErrorRuntimeError
exception RuntimeErrorStopIteration
exception StopIterationSyntaxError
exception SyntaxErrorSystemExit
exception SystemExitSee CPython documentation: SystemExit.
TypeError
exception TypeErrorSee CPython documentation: TypeError.
ValueError
exception ValueErrorZeroDivisionError
exception ZeroDivisionError