(s)
return s.encode(DEFAULT_ENCODING)
Convert text string to binary.
Convert text string to binary.
Convert text string to binary .
def to_binary_string(s):
  """Convert text string to binary."""
  if isinstance(s, bytes):
    return s
  return s.encode(DEFAULT_ENCODING)
def to_binary_string ( s ) : if isinstance ( s , bytes ) : return s return s . encode ( DEFAULT_ENCODING )