astor
astor copied to clipboard
astor is converting hex numbers the numbers into integers
Is there a way to tell astor to keep showing the hex values as it is without converting it to integers?
Here is an example
import ast
import astor
code_snippet = """var = 0xf"""
parsed_ast = ast.parse(code_snippet)
source_code = astor.to_source(parsed_ast)
print(source_code) # prints var = 15