It's interesting to see how easy this is in Python. I'm working on a developer tool for C/C++ that uses clang's AST for retrieving this sort of semantic information. We might support Python one day too.<p><a href="https://www.coati.io/" rel="nofollow">https://www.coati.io/</a>