Message226732
| Author |
terry.reedy |
| Recipients |
Arfrever, christian.heimes, eric.araujo, georg.brandl, gotgenes, hct, mark.dickinson, martin.panter, ncoghlan, pitrou, rhettinger, serhiy.storchaka, terry.reedy, vstinner, wiggin15 |
| Date |
2014年09月10日.23:29:34 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1410391774.33.0.620860901273.issue9951@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2014年09月10日 23:29:34 | terry.reedy | set | 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:34 | terry.reedy | set | messageid: <1410391774.33.0.620860901273.issue9951@psf.upfronthosting.co.za> |
| 2014年09月10日 23:29:34 | terry.reedy | link | issue9951 messages |
| 2014年09月10日 23:29:34 | terry.reedy | create |
|