8000 astor is converting hex numbers the numbers into integers · Issue #226 · berkerpeksag/astor · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
< 8000 div id="js-flash-container" class="flash-container" data-turbo-replace>

astor is converting hex numbers the numbers into integers #226

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
F1o0T opened this issue Aug 14, 2024 · 0 comments
Open

astor is converting hex numbers the numbers into integers #226

F1o0T opened this issue Aug 14, 2024 · 0 comments

Comments

@F1o0T
Copy link
F1o0T commented Aug 14, 2024

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant
0