Show More
@@ -638,10 +638,10 b' def _re_pattern_pprint(obj, p, cycle):' | |||
|
638 | 638 | |
|
639 | 639 | def _type_pprint(obj, p, cycle): |
|
640 | 640 | """The pprint for classes and types.""" |
|
641 | try: | |
|
642 | mod = obj.__module__ | |
|
643 | except AttributeError: | |
|
644 | # Heap allocated types might not have the module attribute. | |
|
641 | mod = getattr(obj, '__module__', None) | |
|
642 | if mod is None: | |
|
643 | # Heap allocated types might not have the module attribute, | |
|
644 | # and others may set it to None. | |
|
645 | 645 | return p.text(obj.__name__) |
|
646 | 646 | |
|
647 | 647 | if mod in ('__builtin__', 'exceptions'): |
General Comments 0
You need to be logged in to leave comments.
Login now