def needsquoting(c, quotetabs, header):
 assert isinstance(c, bytes)
 if (c in '  DCTB '):
  return quotetabs
 if (c == '_'):
  return header
 return ((c == ESCAPE) or (not (' ' <= c <= '~')))

def needsquoting ( c , quotetabs , header ) : assert isinstance ( c , bytes ) if ( c in '  DCTB ' ) : return quotetabs if ( c == '_' ) : return header return ( ( c == ESCAPE ) or ( not ( ' ' <= c <= '~' ) ) )
decide whether a particular character needs to be quoted .