This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

作者 terry.reedy
收信人 Arfrever, christian.heimes, eric.araujo, georg.brandl, gotgenes, hct, mark.dickinson, martin.panter, ncoghlan, pitrou, rhettinger, serhiy.storchaka, terry.reedy, vstinner, wiggin15
日期 2014-09-10.23:29:34
SpamBayes Score -1.0
Marked as misclassified
Message-id <1410391774.33.0.620860901273.issue9951@psf.upfronthosting.co.za>
In-reply-to
内容
The proposal is to add a .hex method (similar to binascii.hexlify) that is the inverse of .fromhex (similar to binascii.unhexlify), as originally specified in PEP 358.
http://legacy.python.org/dev/peps/pep-0358/
"The object has a .hex() method that does the reverse [of .frombytes]
   >> bytes([92, 83, 80, 255]).hex()
   '5c5350ff'
"
If we add .hex, I think we should stick with this: no 0x or \x prefix. 

To aid debugging, I would change spaces to be None or a positive int n to insert a space every n bytes.  So .hex(8) for an array of 64 bit ints.
历史
日期 用户 动作 参数
2014-09-10 23:29:34terry.reedy修改recipients: + terry.reedy, georg.brandl, rhettinger, mark.dickinson, ncoghlan, pitrou, vstinner, gotgenes, christian.heimes, eric.araujo, Arfrever, wiggin15, martin.panter, serhiy.storchaka, hct
2014-09-10 23:29:34terry.reedy修改messageid: <1410391774.33.0.620860901273.issue9951@psf.upfronthosting.co.za>
2014-09-10 23:29:34terry.reedy链接issue9951 messages
2014-09-10 23:29:34terry.reedy创建