Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
tclancy
· 1y ago · 0 comments
Nice. I usually fall back to dir() as my first inspection tool at the command line.
Comments
[–]
mdaniel
1y ago
or its awesome two friends: locals() and globals() to see their names and values simultaneously; I've gotten a lot of mileage out of that as a pseudo-debugger when the only insight you have is a logger in production
[–]
kstrauser
1y ago
Don't forget `vars()`.
[–]
bayesianbot
1y ago
I used to, but wat offers a better printout of the methods:
https://github.com/igrek51/wat
[–]
analog31
1y ago
I bounce back and forth. First dir() then help()...
[–]
infamia
1y ago
vars() is another good one if you're looking for something with a particular value.