def _exception_pprint(obj, p, cycle):
 name = getattr(obj.__class__, '__qualname__', obj.__class__.__name__)
 if (obj.__class__.__module__ not in ('exceptions', 'builtins')):
  name = ('%s.%s' % (obj.__class__.__module__, name))
 step = (len(name) + 1)
 p.begin_group(step, (name + '('))
 for (idx, arg) in enumerate(getattr(obj, 'args', ())):
  if idx:
   p.text(',')
   p.breakable()
  p.pretty(arg)
 p.end_group(step, ')')

def _exception_pprint ( obj , p , cycle ) : name = getattr ( obj . __class__ , '__qualname__' , obj . __class__ . __name__ ) if ( obj . __class__ . __module__ not in ( 'exceptions' , 'builtins' ) ) : name = ( '%s.%s' % ( obj . __class__ . __module__ , name ) ) step = ( len ( name ) + 1 ) p . begin_group ( step , ( name + '(' ) ) for ( idx , arg ) in enumerate ( getattr ( obj , 'args' , ( ) ) ) : if idx : p . text ( ',' ) p . breakable ( ) p . pretty ( arg ) p . end_group ( step , ')' )
base pprint for all exceptions .