def binary_is_text(data):
 if (not isinstance(data, bytes)):
  raise TypeError(("data must be bytes, got '%s'" % type(data).__name__))
 return all(((c not in _BINARYCHARS) for c in data))

def binary_is_text ( data ) : if ( not isinstance ( data , bytes ) ) : raise TypeError ( ( "data must be bytes, got '%s'" % type ( data ) . __name__ ) ) return all ( ( ( c not in _BINARYCHARS ) for c in data ) )
returns true if the given data argument does not contain unprintable control characters .