[Tutor] Making an alias

Jim Mooney cybervigilante at gmail.com
Sat Apr 25 02:19:33 CEST 2015


Actually,. I found the aliases in Lib/encodings/aliases.py and added an
alias:

>>> deco = bytes("I sure hate apples.", encoding='ubom')
>>> deco
b'\xef\xbb\xbfI sure hate apples.'
>>>

Tricky, though - if you don't put a comma at the end of your alias, it
breaks Python (or my Pyscripter editor, anyway ;')
-- 
Jim


More information about the Tutor mailing list