Python's biggest weakness is the lack of a function that shows you how exactly a variable looks like. the var_dump (php, ha!) works like wonders. The best library ever created for Python ;). and now wat is also looking to be a close contender for best helping hand.
Comments (92) 30 threads
Earlier commentsDoesn't the repr() built-in function do what you want?
It can also be customized by defining the __repr__() method of a class, IIRC.
Commonly done.
Read about repr() here:
https://docs.python.org/3/library/functions.html
and dunder repr, i.e. __repr__() here:
https://docs.python.org/3/reference/datamodel.html#object.__...
For node you it’s possible to hook it up with the browser inspector as well
Hooking devtools with Node is possible but could be a lot nicer.
All comments shown.
Couldn't load more comments. Check your connection and try again.