code: def tonativefunc(enc='utf-8'):
      ''' Returns a function that turns everything into 'native' strings using enc '''
      if sys.version_info >= (3,0,0):
          return lambda x: x.decode(enc) if isinstance(x, bytes) else str(x)
      return lambda x: x.encode(enc) if isinstance(x, unicode) else str(xf tonativefunc(enc='utf-8'):
      ''' Returns a function that turns everything into 'native' strings using enc '''
      if sys.version_info >= (3,0,0):
          return lambda x: x.decode(enc) if isinstance(x, bytes) else str(x)
      return lambda x: x.encode(enc) if isinstance(x, unicode) else str(x)
docs: Returns a function that turns everything into 'native' strings using enc