You can see all the Python goodness that is available to you, right from the builtins by typing
dir(__builtins__) in the Python REPL. You may see types here that you recognize, like
And you may see functions that you recognize like
'list'. But where is the value of
__builtins__ defined? To figure that out, you can run the following command:
That means that the value of the
__builtins__ name is actually the
builtins module. This is indeed the module where all builtins are located, as you can see when you import the
builtins module and check whether
builtins, which shows you that it is!
Become a Member to join the conversation.