[Python-Dev] bytes.from_hex() [Was: PEP 332 revival in coordination with pep 349?] (original) (raw)
Thomas Heller theller at python.net
Wed Feb 15 20:21:03 CET 2006
- Previous message: [Python-Dev] bytes.from_hex()
- Next message: [Python-Dev] bytes.from_hex() [Was: PEP 332 revival in coordination with pep 349?]
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Jason Orendorff wrote:
Instead of byte literals, how about a classmethod bytes.fromhex(), which works like this:
# two equivalent things expectedmd5hash = bytes.fromhex('5c535024cac5199153e3834fe5c92e6a')
I hope this will also be equivalent:
expectedmd5hash = bytes.fromhex('5c 53 50 24 ca c5 19 91 53 e3 83 4f e5 c9 2e 6a')
Thomas
- Previous message: [Python-Dev] bytes.from_hex()
- Next message: [Python-Dev] bytes.from_hex() [Was: PEP 332 revival in coordination with pep 349?]
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]