4 ms·
Please make more stuff :) Are you on Twitter or anything? I'd like to follow your work. (Put some info in your HN profile!) I noticed that watchpoints doesn't
by sillysaurusx 6y ago
Please make more stuff :)
Are you on Twitter or anything? I'd like to follow your work. (Put some info in your HN profile!)
I noticed that watchpoints doesn't work in the REPL, and since I live in the REPL, it limits my usage somewhat. But after digging into the code, I'm not quite sure if it even makes sense in the context of <stdin>...
I was also -- as the other commenter said, excuse the french -- fucking amazed that this works great:
from watchpoints import watch
a = []
watch(a)
a.append(1) # Trigger
a = {} # Trigger
def qq():
global a
a = 99 # Trigger
qq()
Did not expect that.
- gaogaotiantian 6y agoI'm not on twitter, but I do have a twitter account for my other project viztracer @viztracer. All my work is on my github if you are interested :) watchpoints does not work in the REPL. REPL is a more complicated environment. I don't think pdb will work in REPL either. watchpoints works very intuitively. It has some dirty magic that made it work in some way that you need but not expect.