-
Notifications
You must be signed in to change notification settings - Fork 21
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
Feature request: handle ast node pretty printing #14
Comments
Sounds awesome! Would definitely accept a PR which knows how to handle AST nodes. |
Notes to myself about potentially implementing this from my initial reading of the code:
Alternatively, add the ability to punt and call out to an external formatting function for a particular container class, feeding it the current indent, to let it handle pretty formatting itself rather than knowing how to format everything ourselves, possibly passing along the formatting function to use for the contained objects. |
Woo! I'm tentatively in favor of your proposed subclass handling, just so long as it won't break subclasses with custom repr methods (ex, if I have |
Thanks, I'll get started on it and keep you posted. Appreciate the feedback. |
Ideally, something more like http://alexleone.blogspot.com/2010/01/python-ast-pretty-printer.html than like ast.dump, but anything would be better than the default useless
repr()
of ast nodes :)The text was updated successfully, but these errors were encountered: