]> granicus.if.org Git - python/commitdiff
Make Py3.x style "import builtins"
authorRaymond Hettinger <python@rcn.com>
Sat, 26 Feb 2011 02:48:44 +0000 (02:48 +0000)
committerRaymond Hettinger <python@rcn.com>
Sat, 26 Feb 2011 02:48:44 +0000 (02:48 +0000)
Doc/library/collections.rst

index f409536b6fbb93cbc688cc8aca4129996646f2c9..b6ab342555bc1a08a0d89c6c69ce80cf63a60b9c 100644 (file)
@@ -95,8 +95,8 @@ The class can be used to simulate nested scopes and is useful in templating.
 
   Example of simulating Python's internal lookup chain::
 
-     import __builtin__
-     pylookup = ChainMap(locals(), globals(), vars(__builtin__))
+     import builtins
+     pylookup = ChainMap(locals(), globals(), vars(builtins))
 
   Example of letting user specified values take precedence over environment
   variables which in turn take precedence over default values::