Visitar URL original
generate python source code · Issue #33 · go-python/gpython · GitHub
The Wayback Machine - https://web.archive.org/web/20200910210611/https://github.com/go-python/gpython/issues/33
Skip to content
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

generate python source code #33

Open
abduld opened this issue Oct 28, 2018 · 1 comment
Open

generate python source code #33

abduld opened this issue Oct 28, 2018 · 1 comment

Comments

@abduld
Copy link

@abduld abduld commented Oct 28, 2018

given an ast, how does one generate the corresponding python source code

thank you

@ncw
Copy link
Collaborator

@ncw ncw commented Nov 2, 2018

The ast doesn't preserve the comments nor the fine code structure so you can't preserve the exact code structure.

You could traverse the ast to create some code which worked the same though.

There isn't a way of doing this right now, but it wouldn't be too tricky to implement.

Why do you want to do this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.