def is_binary_string(obj):
 if PY2:
  return isinstance(obj, str)
 else:
  return isinstance(obj, bytes)

def is_binary_string ( obj ) : if PY2 : return isinstance ( obj , str ) else : return isinstance ( obj , bytes )
return true if obj is a binary string .