Skip to main content

python-wat

#post

Deeply inspect Python objects with WAT

  • Inspect everything about a python object
  • More powerful alternative to the built-in dir() and help() functions
  • Intended to be used in the Python REPL (e.g. while debugging with pdb)
  • Some of its functionality is probably available in your IDE (e.g. seeing a function’s signature and docstring, going to the source code definition of an object, inspecting variables at breakpoints while debugging, etc)
  • What can it do that an IDE can’t?
    • confirming the type via wat.short — better result than IDE type inference? same?
pip install wat-inspector
import wat
 
wat / object_to_inspect # intended to be faster to type
wat(object_to_inspect) # this also works
 
wat.short / object_to_inspect
wat.long
wat.dunder
wat.code
wat.nodocs
wat.all
 

Screenshot

Video