def smart_bytes(s, encoding=u'utf-8', strings_only=False, errors=u'strict'):
 if isinstance(s, Promise):
  return s
 return force_bytes(s, encoding, strings_only, errors)

def smart_bytes ( s , encoding = u'utf-8' , strings_only = False , errors = u'strict' ) : if isinstance ( s , Promise ) : return s return force_bytes ( s , encoding , strings_only , errors )
returns a bytestring version of s .