#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

@ -13,7 +13,7 @@ Exported classes:
# note: avoid importing non-builtin modules
import imp ### not available in JPython?
import sys
import __builtin__
import builtins
# for the DirectoryImporter
import struct
@ -26,7 +26,7 @@ _ModuleType = type(sys) ### doesn't work in JPython...
class ImportManager:
"Manage the import process."
def install(self, namespace=vars(__builtin__)):
def install(self, namespace=vars(builtins)):
"Install this ImportManager into the specified namespace."
if isinstance(namespace, _ModuleType):
@ -404,7 +404,7 @@ def _compile(pathname, timestamp):
codestring = open(pathname, 'rU').read()
if codestring and codestring[-1] != '\n':
codestring = codestring + '\n'
code = __builtin__.compile(codestring, pathname, 'exec')
code = builtins.compile(codestring, pathname, 'exec')
# try to cache the compiled code
try: