##// END OF EJS Templates
Merge pull request #4405 from takluyver/builtin-types-pprint-py3...
Min RK -
r13142:25ad487b merge
parent child Browse files
Show More
@@ -103,7 +103,6 b' Inheritance diagram:'
103 103 Portions (c) 2009 by Robert Kern.
104 104 :license: BSD License.
105 105 """
106 from __future__ import with_statement
107 106 from contextlib import contextmanager
108 107 import sys
109 108 import types
@@ -658,7 +657,7 b' def _type_pprint(obj, p, cycle):'
658 657 # and others may set it to None.
659 658 return p.text(obj.__name__)
660 659
661 if mod in ('__builtin__', 'exceptions'):
660 if mod in ('__builtin__', 'builtins', 'exceptions'):
662 661 name = obj.__name__
663 662 else:
664 663 name = mod + '.' + obj.__name__
@@ -672,7 +671,7 b' def _repr_pprint(obj, p, cycle):'
672 671
673 672 def _function_pprint(obj, p, cycle):
674 673 """Base pprint for all functions and builtin functions."""
675 if obj.__module__ in ('__builtin__', 'exceptions') or not obj.__module__:
674 if obj.__module__ in ('__builtin__', 'builtins', 'exceptions') or not obj.__module__:
676 675 name = obj.__name__
677 676 else:
678 677 name = obj.__module__ + '.' + obj.__name__
General Comments 0
You need to be logged in to leave comments. Login now