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 bool

bytearray

class bytearray

bytes

class bytes

See CPython documentation: bytes.

callable

callable()

chr

chr()

classmethod

classmethod()

compile

compile()

complex

class complex

delattr

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 dict

dir

dir()

divmod

divmod()

enumerate

enumerate()

eval

eval()

exec

exec()

filter

filter()

float

class float

frozenset

class frozenset

getattr

getattr()

globals

globals()

hasattr

hasattr()

hash

hash()

hex

hex()

id

id()

input

input()

int

class int

from_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 list

locals

locals()

map

map()

max

max()

memoryview

class memoryview

min

min()

next

next()

object

class object

oct

oct()

open

open()

ord

ord()

pow

pow()

print

print()

property

property()

range

range()

repr

repr()

reversed

reversed()

round

round()

set

class set

setattr

setattr()

slice

class slice

The slice builtin is the type that slice objects have.

sorted

sorted()

staticmethod

staticmethod()

str

class str

sum

sum()

super

super()

tuple

class tuple

type

type()

zip

zip()

Exceptions

AssertionError

exception AssertionError

AttributeError

exception AttributeError

Exception

exception Exception

ImportError

exception ImportError

IndexError

exception IndexError

KeyboardInterrupt

exception KeyboardInterrupt

KeyError

exception KeyError

MemoryError

exception MemoryError

NameError

exception NameError

NotImplementedError

exception NotImplementedError

OSError

exception OSError

RuntimeError

exception RuntimeError

StopIteration

exception StopIteration

SyntaxError

exception SyntaxError

SystemExit

exception SystemExit

See CPython documentation: SystemExit.

TypeError

exception TypeError

See CPython documentation: TypeError.

ValueError

exception ValueError

ZeroDivisionError

exception ZeroDivisionError

On this page

builtins – builtin functions and exceptions