in xand __builtin__ for the same in who said documenting this stuff was easybreaking the universe in python here' another thing you can do in python that you probably shouldn' --because the names true and false in are just variables in the built-in scope and are not reservedit' possible to reassign them with statement like true false don' worryyou won' actually break the logical consistency of the universe in so doingthis statement merely redefines the word true for the single scope in which it appears to return false all other scopes still find the originals in the built-in scope for more funthoughin python you could say __builtin__ true falseto reset true to false for the entire python process this works because there is only one builtin scope module in programshared by all its clients alasthis type of assignment has been disallowed in python xbecause true and false are treated as actual reserved wordsjust like none in xthoughit sends idle into strange panic state that resets the user code process (in other wordsdon' try this at homekidsthis technique can be usefulhoweverboth to illustrate the underlying namespace modeland for tool writers who must change built-ins such as open to customized functions by reassigning function' name in the built-in scopeyou reset it to your customization for every module in the process if you doyou'll probably also need to remember the original version to call from your customization--in factwe'll see one way to achieve this for custom open in the sidebar "why you will carecustomizing openon page after we've had chance to explore nested scope closures and state retention options alsonote again that third-party tools such as pycheckerand others such as pylintwill warn about common programming mistakesincluding accidental assignment to built-in names (this is usually known as "shadowinga built-in in such toolsit' not bad idea to run your first few python programs through tools like these to see what they point out the global statement the global statement and its nonlocal cousin are the only things that are remotely like declaration statements in python they are not type or size declarationsthoughthey are namespace declarations the global statement tells python that function plans to change one or more global names--that isnames that live in the enclosing module' scope (namespacewe've talked about global in passing already here' summaryglobal names are variables assigned at the top level of the enclosing module file scopes