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