On Wed, 2006-02-15 at 14:01 -0500, Jason Orendorff wrote: > Instead of byte literals, how about a classmethod bytes.from_hex(), > which works like this: > > # two equivalent things > expected_md5_hash = > bytes.from_hex('5c535024cac5199153e3834fe5c92e6a') > expected_md5_hash = bytes([92, 83, 80, 36, 202, 197, 25, 145, 83, > 227, 131, 79, 229, 201, 46, 106]) Kind of like binascii.unhexlify() but returning a bytes object. -Barry -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 307 bytes Desc: This is a digitally signed message part Url : http://mail.python.org/pipermail/python-dev/attachments/20060215/a7594dd8/attachment.pgp
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4