Alex Willmer <a...@moreati.org.uk> writes: > def plus_encode(s): > """Encode a unicode string with only ascii letters, digits, _, -, @, + > """ > bytemap_ = bytemap > s_utf8 = s.encode('utf-8') > return ''.join([bytemap[byte] for byte in s_utf8])
Minor nit: you defined a local alias for bytemap for faster access, but didn't actually used it. ciao, lele. -- nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia. l...@metapensiero.it | -- Fortunato Depero, 1929. -- https://mail.python.org/mailman/listinfo/python-list