Closed ssbr closed 5 years ago
I'm not very good at git/github (use a different VCS at work), so I'm not sure how everything works, but I made a PR with my suggested fix: https://github.com/gristlabs/asttokens/pull/22
This is fixed by #22 now, right?
Yes, I believe so. (Sorry about that; not used to github issues etc., I don't use github as much at work.)
Python 2:
In Python 3 it works just fine.
I expect failures if the string is not UTF-8 (e.g. if it had coding:latin1 and some invalid utf-8 in there), but I had somewhat hoped that it would also just work to pass in the raw bytes.
I think the easiest workaround for end users is to parse it manually by hand:
asttokens could also do that internally itself -- parse the tree before decoding, instead of after.