-
Notifications
You must be signed in to change notification settings - Fork 40
Closed
Description
Currently, to find out where in the code which variable names occur, I traverse the code token-by-token and apply a sort of ad hoc stack machine that detects stuff like the beginning of function definitions, dot attributes etc. This is clearly nuts, and purely a path effect (= it's how ipython's ultratb does it, and then my scope expanded and here we are).
https://github.com/cknd/stackprinter/blob/master/stackprinter/source_inspection.py
This approach works for now, but it has hit its limits. For example, I'd like to ignore the left-hand side of named arguments in function calls.
Goals:
- annotate in a piece of code where each variable name occurs, exactly like the current system, but with less of a home made rube goldberg machine behind it.
- keep the ability to rerender the original code character by character as it appears in the source file (incl extra whitespaces, comment ascii art etc -- so people can visually recognize their code)
Metadata
Metadata
Assignees
Labels
No labels