2.8 KiB
builtins
-- builtin functions
and exceptions
All builtin functions and exceptions are described here. They are
also available via builtins
module.
Functions and types
abs()
all()
any()
bin()
python:bytes.
callable()
chr()
classmethod()
compile()
delattr(obj, name)
The argument name should be a string, and this function deletes the named attribute from the object given by obj.
dir()
divmod()
enumerate()
eval()
exec()
filter()
getattr()
globals()
hasattr()
hash()
hex()
id()
input()
from_bytes(bytes, byteorder)
In MicroPython, byteorder parameter must be positional (this is compatible with CPython).
to_bytes(size, byteorder)
In MicroPython, byteorder parameter must be positional (this is compatible with CPython).
isinstance()
issubclass()
iter()
len()
locals()
map()
max()
min()
next()
oct()
open()
ord()
pow()
print()
property()
range()
repr()
reversed()
round()
setattr()
The slice builtin is the type that slice objects have.
sorted()
staticmethod()
sum()
super()
type()
zip()
Exceptions
AssertionError
AttributeError
Exception
ImportError
IndexError
KeyboardInterrupt
KeyError
MemoryError
NameError
NotImplementedError
OSError
RuntimeError
StopIteration
SyntaxError
SystemExit
python:SystemExit.
TypeError
python:TypeError.
ValueError
ZeroDivisionError