def encode(*args,**kw):
    obj = args[0]
    if len(args)==2:
        encoding = args[1]
    else:
        encoding = 'utf-8'
    if isinstance(obj, str):
        return obj.encode(encoding)
encode(obj, [encoding[,errors]]) -> object    
dataset/ETHPy150Open amrdraz/kodr/app/brython/www/src/Lib/_codecs.py/encode