0

I intent to retrieve a list of default Built-in Functions specified in 2. Built-in Functions

How to list them all?

Just as list all the keywords as:

python
import keyword
keyword.kwlist

is it possible to list all the 68 functions?


This is my first question on SO, please note that it definitely not duplicate to the existing stuff on stackoverflow or even the world.

My question asked about the 68 builtin functions listed by docs which are absolutely different from dir(__builtins__): enter image description here

AbstProcDo
  • 19,953
  • 19
  • 81
  • 138

2 Answers2

5

This will show all builtins:

>>> dir(__builtins__)
['ArithmeticError', 'AssertionError', ...,  'type', 'vars', 'zip']
Ignacio Vazquez-Abrams
  • 776,304
  • 153
  • 1,341
  • 1,358
0
class BuiltinFunctions_42:
    def __init__(self):
        self.in = ['input']
        self.file = ['open']
        self.number =  ['hex', 'oct', 'abs', 'round', 'divmod', 'pow', 'sum']
        self.string =  ['format', 'ord', 'chr', 'ascii', 'bin']
        self.obj = ['id']
        self.sequence = ['hash', 'len', 'max', 'min']
        self.iterator = ['all', 'any','iter', 'next']
        self.function = ['callable']
        self.code =  ['eval', 'exec', 'compile']
        self.klass = ['__build_class__', 'issubclass']
        self.instance = ['repr','isinstance', 'hasattr',  'getattr', 'setattr', 'delattr']
        self.module = ['__import__']

        self.dubug = {'introspection':{'locals', 'globals'}}
        self.out = ['print', 'dir', 'vars']
AbstProcDo
  • 19,953
  • 19
  • 81
  • 138