def tonative(n, encoding='ISO-8859-1'):
        # In Python 2, the native string type is bytes.
        if isinstance(n, unicode):
            return n.encode(encoding)
        return n
Return the given string as a native string in the given encoding.
dataset/ETHPy150Open AppScale/appscale/AppServer/lib/cherrypy/cherrypy/_cpcompat.py/tonative