Open KOLANICH opened 2 years ago
Hy also does this, since https://github.com/hylang/hy/pull/1999. astor might as well do it internally.
Necrobump. The astor.code_to_ast()
function decompiling arbitrary code objects into corresponding ASTs still appears to have no equivalent in any other library – including the standard ast
module. Is that correct? If so, astor
should absolutely not retire but instead mono-focus on this one thing astor
still does that nobody else does.
In fact, that's exactly how I discovered astor
: via this StackOverflow question, whose first comment namedrops astor
as the only available solution. Long live astor
! :fist_raised:
Yep I've been doing that for ages: https://github.com/offscale/cdd-python/blob/f64f886/cdd/source_transformer.py#L13-L27