This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defparameter defun-super-debug t) | |
(defmacro defun-wrapped-error (name vars &rest body) | |
" | |
A wrapper around defun that will catch any error and note which function it comes from before | |
re-raising the error. | |
" | |
`(defun ,name ,vars | |
(handler-case | |
(progn |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def f3(x): | |
return 3*x | |
def f4(x): | |
return 4*x | |
def f2a(x): | |
return 2*f3(x) | |
def f2b(x): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ast | |
import pprint | |
import networkx as nx | |
import matplotlib.pyplot as plt | |
class viz_walker(ast.NodeVisitor): | |
def __init__(self): | |
self.stack = [] |
NewerOlder