summaryrefslogtreecommitdiffstats
path: root/Lib/inspect.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2007-12-02 09:40:06 (GMT)
committerGeorg Brandl <georg@python.org>2007-12-02 09:40:06 (GMT)
commit1a3284ed69d545e4ef59869998cb8c29233a45fa (patch)
tree98728a9b7aae6188ee8124160007a9d5c5277f8c /Lib/inspect.py
parent87f9c53937ce47f55851ac7c71a94e46cf9142bf (diff)
downloadcpython-1a3284ed69d545e4ef59869998cb8c29233a45fa.zip
cpython-1a3284ed69d545e4ef59869998cb8c29233a45fa.tar.gz
cpython-1a3284ed69d545e4ef59869998cb8c29233a45fa.tar.bz2
#1535: rename __builtin__ module to builtins.
Diffstat (limited to 'Lib/inspect.py')
-rw-r--r--Lib/inspect.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/inspect.py b/Lib/inspect.py
index a1910e4..994dbdc 100644
--- a/Lib/inspect.py
+++ b/Lib/inspect.py
@@ -444,7 +444,7 @@ def getmodule(object, _filename=None):
if mainobject is object:
return main
# Check builtins
- builtin = sys.modules['__builtin__']
+ builtin = sys.modules['builtins']
if hasattr(builtin, object.__name__):
builtinobject = getattr(builtin, object.__name__)
if builtinobject is object:
@@ -775,7 +775,7 @@ def strseq(object, convert, join=joinseq):
def formatannotation(annotation, base_module=None):
if isinstance(annotation, type):
- if annotation.__module__ in ('__builtin__', base_module):
+ if annotation.__module__ in ('builtins', base_module):
return annotation.__name__
return annotation.__module__+'.'+annotation.__name__
return repr(annotation)