names as reserved with over names in this module in that would be far too restrictive and dauntinglen(dir(builtins))len([ for in dir(builtinsif not startswith('__')]( in factthere are times in advanced programming where you may really want to replace built-in name by redefining it in your code--to define custom open that verifies access attemptsfor instance (see this sidebar "breaking the universe in python xon page for more on this threadstillredefining built-in name is often bugand nasty one at thatbecause python will not issue warning message about it tools like pychecker (see the webcan warn you of such mistakesbut knowledge may be your best defense on this pointdon' redefine built-in name you need if you accidentally reassign built-in name at the interactive prompt this wayyou can either restart your session or run del name statement to remove the redefinition from your scopethereby restoring the original in the built-in scope note that functions can similarly hide global variables of the same name with localsbut this is more broadly usefuland in fact is much of the point of local scopes--because they minimize the potential for name clashesyour functions are self-contained namespace scopesx global def func() local xhides globalbut we want this here func(print(xprints unchanged herethe assignment within the function creates local that is completely different variable from the global in the module outside the function as one consequencethoughthere is no way to change name outside function without adding global (or nonlocaldeclaration to the defas described in the next section version skew noteactuallythe tongue twisting gets bit worse the python builtins module used here is named __builtin__ in python in additionthe name __builtins__ (with the sis preset in most global scopesincluding the interactive sessionto reference the module known as builtins in and __builtin__ in xso you can often use __builtins__ without an import but cannot run an import on that name itself--it' preset variablenot module' name that isin builtins is __builtins__ is true after you import buil tinsand in __builtin__ is __builtins__ is true after you import __builtin__ the upshot is that we can usually inspect the built-in scope by simply running dir(__builtins__with no import in both and python scope basics