#1535: rename __builtin__ module to builtins.

This commit is contained in:
Georg Brandl 2007-12-02 09:40:06 +00:00
parent 87f9c53937
commit 1a3284ed69
70 changed files with 246 additions and 247 deletions

View file

@ -52,7 +52,7 @@ Richard Chamberlain, for the first implementation of textdoc.
# the current directory is changed with os.chdir(), an incorrect
# path will be displayed.
import sys, imp, os, re, inspect, __builtin__, pkgutil
import sys, imp, os, re, inspect, builtins, pkgutil
from repr import Repr
try:
from collections import deque
@ -787,7 +787,7 @@ class HTMLDoc(Doc):
thisclass = attrs[0][2]
attrs, inherited = _split_list(attrs, lambda t: t[2] is thisclass)
if thisclass is __builtin__.object:
if thisclass is builtins.object:
attrs = inherited
continue
elif thisclass is object:
@ -1184,7 +1184,7 @@ class TextDoc(Doc):
thisclass = attrs[0][2]
attrs, inherited = _split_list(attrs, lambda t: t[2] is thisclass)
if thisclass is __builtin__.object:
if thisclass is builtins.object:
attrs = inherited
continue
elif thisclass is object:
@ -1450,8 +1450,8 @@ def locate(path, forceload=0):
except AttributeError: return None
return object
else:
if hasattr(__builtin__, path):
return getattr(__builtin__, path)
if hasattr(builtins, path):
return getattr(builtins, path)
# --------------------------------------- interactive interpreter interface