The builtins namespace associated with code execution is actually found by looking for a name __builtins__in its global namespace; it must be a dictionary or module (in the latter case, a dictionary of modules is used). By default, when a module __main__ __builtins__has a built-in module __builtin__(note: no 's); when in any other module __builtins__is an alias for the dictionary of the module itself __builtin__. __builtins__can be installed in a user dictionary to create a weak form of limited execution.
, __builtins__ ( )
>>> __builtins__.max
<built-in function max>
, , __builtin__ ( , __builtins__).