4 ms·
"hex" and "base64" are still available via the codecs module: >>> import codecs >>> codecs.encode(b'eggs', 'hex') b'65676773' >>> codecs.encode(b'eggs'
by jwilk 9y ago
"hex" and "base64" are still available via the codecs module:
>>> import codecs
>>> codecs.encode(b'eggs', 'hex')
b'65676773'
>>> codecs.encode(b'eggs', 'base64')
b'ZWdncw==\n'
- dom0 9y agoThough I agree that it was an annoying change. hex/fromhex have helped there, though a 3.4 codebase retains stupid helpers like bin_to_hex.