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

asked Aug 6, 2017 at 4:36
0

2 Answers 2

5

This will show all builtins:

>>> dir(__builtins__)
['ArithmeticError', 'AssertionError', ..., 'type', 'vars', 'zip']
answered Aug 6, 2017 at 4:40
Sign up to request clarification or add additional context in comments.

9 Comments

@cᴏʟᴅsᴘᴇᴇᴅ: Unfortunately I don't know quite every Python question on this site yet.
If it's not a duplicate you may want to take a look at this.
dir(builtins) list all the 151 builtin libraries nor to show the 68 functions. @IgnacioVazquez-Abrams
the question did not duplicate, see my answer @cᴏʟᴅsᴘᴇᴇᴅ
The exact same answer was present in the question I marked here. Duplicate answers are fine.
|
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']
answered Aug 7, 2017 at 4:58

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.