2016-06-08 17:24:52 -04:00
|
|
|
Builtin Functions
|
|
|
|
=================
|
|
|
|
|
2016-07-31 19:52:00 -04:00
|
|
|
All builtin functions are described here. They are also available via
|
2016-06-08 17:24:52 -04:00
|
|
|
``builtins`` module.
|
|
|
|
|
|
|
|
.. function:: abs()
|
|
|
|
|
|
|
|
.. function:: all()
|
|
|
|
|
|
|
|
.. function:: any()
|
|
|
|
|
|
|
|
.. function:: bin()
|
|
|
|
|
|
|
|
.. class:: bool()
|
|
|
|
|
|
|
|
.. class:: bytearray()
|
|
|
|
|
|
|
|
.. class:: bytes()
|
|
|
|
|
|
|
|
.. function:: callable()
|
|
|
|
|
|
|
|
.. function:: chr()
|
|
|
|
|
|
|
|
.. function:: classmethod()
|
|
|
|
|
|
|
|
.. function:: compile()
|
|
|
|
|
|
|
|
.. class:: complex()
|
|
|
|
|
2016-10-24 20:02:47 -04:00
|
|
|
.. function:: delattr(obj, name)
|
|
|
|
|
|
|
|
The argument *name* should be a string, and this function deletes the named
|
|
|
|
attribute from the object given by *obj*.
|
|
|
|
|
2016-06-08 17:24:52 -04:00
|
|
|
.. class:: dict()
|
|
|
|
|
|
|
|
.. function:: dir()
|
|
|
|
|
|
|
|
.. function:: divmod()
|
|
|
|
|
|
|
|
.. function:: enumerate()
|
|
|
|
|
|
|
|
.. function:: eval()
|
|
|
|
|
|
|
|
.. function:: exec()
|
|
|
|
|
|
|
|
.. function:: filter()
|
|
|
|
|
|
|
|
.. class:: float()
|
|
|
|
|
|
|
|
.. class:: frozenset()
|
|
|
|
|
|
|
|
.. function:: getattr()
|
|
|
|
|
|
|
|
.. function:: globals()
|
|
|
|
|
|
|
|
.. function:: hasattr()
|
|
|
|
|
|
|
|
.. function:: hash()
|
|
|
|
|
|
|
|
.. function:: hex()
|
|
|
|
|
|
|
|
.. function:: id()
|
|
|
|
|
|
|
|
.. function:: input()
|
|
|
|
|
|
|
|
.. class:: int()
|
|
|
|
|
2017-04-08 17:06:54 -04:00
|
|
|
.. classmethod:: from_bytes(bytes, byteorder)
|
|
|
|
|
|
|
|
In MicroPython, `byteorder` parameter must be positional (this is
|
|
|
|
compatible with CPython).
|
|
|
|
|
|
|
|
.. method:: to_bytes(size, byteorder)
|
|
|
|
|
|
|
|
In MicroPython, `byteorder` parameter must be positional (this is
|
|
|
|
compatible with CPython).
|
|
|
|
|
2016-06-08 17:24:52 -04:00
|
|
|
.. function:: isinstance()
|
|
|
|
|
|
|
|
.. function:: issubclass()
|
|
|
|
|
|
|
|
.. function:: iter()
|
|
|
|
|
|
|
|
.. function:: len()
|
|
|
|
|
|
|
|
.. class:: list()
|
|
|
|
|
|
|
|
.. function:: locals()
|
|
|
|
|
|
|
|
.. function:: map()
|
|
|
|
|
|
|
|
.. function:: max()
|
|
|
|
|
|
|
|
.. class:: memoryview()
|
|
|
|
|
|
|
|
.. function:: min()
|
|
|
|
|
|
|
|
.. function:: next()
|
|
|
|
|
|
|
|
.. class:: object()
|
|
|
|
|
|
|
|
.. function:: oct()
|
|
|
|
|
|
|
|
.. function:: open()
|
|
|
|
|
|
|
|
.. function:: ord()
|
|
|
|
|
|
|
|
.. function:: pow()
|
|
|
|
|
|
|
|
.. function:: print()
|
|
|
|
|
|
|
|
.. function:: property()
|
|
|
|
|
|
|
|
.. function:: range()
|
|
|
|
|
|
|
|
.. function:: repr()
|
|
|
|
|
|
|
|
.. function:: reversed()
|
|
|
|
|
|
|
|
.. function:: round()
|
|
|
|
|
|
|
|
.. class:: set()
|
|
|
|
|
|
|
|
.. function:: setattr()
|
|
|
|
|
2016-10-24 20:02:47 -04:00
|
|
|
.. class:: slice()
|
|
|
|
|
|
|
|
The *slice* builtin is the type that slice objects have.
|
|
|
|
|
2016-06-08 17:24:52 -04:00
|
|
|
.. function:: sorted()
|
|
|
|
|
|
|
|
.. function:: staticmethod()
|
|
|
|
|
|
|
|
.. class:: str()
|
|
|
|
|
|
|
|
.. function:: sum()
|
|
|
|
|
|
|
|
.. function:: super()
|
|
|
|
|
|
|
|
.. class:: tuple()
|
|
|
|
|
|
|
|
.. function:: type()
|
|
|
|
|
|
|
|
.. function:: zip()
|