Now I'm dumping into a YAML document. It's working as it should for the most part. When I try to dump a hexadecimal such as "0x2A" it converts to 42. Isn't there any way to maintain it's hexadecimal format? A string won't work sadly. And int( 0x2A, 16) also just gives me a 42.
Join Stack Overflow to learn, share knowledge, and build your career.
|
You may be looking for Unless you're looking for a way to convince your existing dumping function to use hexadecimal instead of decimal notation... Answering to your comment below, if the problem is that you want upper case letters for the hexadecimal digits (but lower case for the
In both cases, you'll have to print the |
|||||||||||||
|
|
This should do it:
|
|||
|
|
|
Representing all
With reference to this answer. |
||||
|
|