Search notes:

Python: Built in functions

any(iterable) evaluates to True if at least one element of iterable is True, and to False otherwise.
all(iterable) evaluates to True if all elements of iterable are True, and to False otherwise.
bytes
callable determines if an object can be called.
compile
dir list names in the current local scope or attributes of an object.
enumerate
eval
exec
filter
globals
hash
id
int
input to read a line from stdin
isinstance
issubclass
iter
len returns the number of items in a sequence or collection.
list
locals
map
next
open
print
range
reversed
setattr to add an attribute with an arbitrary name
slice
sorted
str
super allows to call methods in a class's base class.
type
sum
zip (which has nothing to do with zip files
__import__
__build_class__ is called when a class is built with the class statement.

Type of functions

If type is applied to the (so called) built-in functions, it turns out that the class some of these functions is builtin_function_or_method and the class of other functions is simply type.
help is special in that its class is _sitebuiltins._Helper (and that it doas not have the __name__ attribute).
In the following table, the colum built-in is ticked if type(f) returns builtin_function_or_method:
built-in
abs
all
any
ascii
bin
bool
breakpoint
bytearray
bytes
callable
chr
classmethod
compile
complex
delattr
dict
dir
divmod
enumerate
eval
exec
filter
float
format
frozenset
getattr
globals
hasattr
hash
help !
hex
id
input
int
isinstance
issubclass
iter
len
list
locals
map
max
memoryview
min
next
object
oct
open
ord
pow
print
property
range
repr
reversed
round
set
setattr
slice
sorted
staticmethod
str
sum
super
tuple
type
vars
zip
__import__
For completeness' sake, here's the script that provided the information for the table:
built_in_funcs = [                        
  abs          , all         , any        , ascii      , bin        ,
  bool         , breakpoint  , bytearray  , bytes      , callable   ,
  chr          , classmethod , compile    , complex    , delattr    ,
  dict         , dir         , divmod     , enumerate  , eval       ,
  exec         , filter      , float      , format     , frozenset  ,
  getattr      , globals     , hasattr    , hash       , help       ,
  hex          , id          , input      , int        , isinstance ,
  issubclass   , iter        , len        , list       , locals     ,
  map          , max         , memoryview , min        , next       ,
  object       , oct         , open       , ord        , pow        ,
  print        , property    , range      , repr       , reversed   ,
  round        , set         , setattr    , slice      , sorted     ,
  staticmethod , str         , sum        , super      , tuple      ,
  type         , vars        , zip        , __import__
]


for f in built_in_funcs:
  #
  # Special check because help does not have the __name__ attribute:
  #
    name = f.__name__ if hasattr(f, '__name__') else 'help'

    print('{:15s} {:s}'.format(name, str(type(f))))
Github repository about-Python, path: /builtin-functions/type-of-functions.py

TODO

quit and exit, which are defined in Lib/site.py, and their relationship to sys.exit.

See also

__builtins__
The CPython source file Python/bltinmodule.c

Index