Lurker News

Comments (92) 30 threads

Show all comments

Showing thread 13 of 30

lofaszvanitt1 reply#
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.
fuzztester1 reply#
>Python's biggest weakness is the lack of a function that shows you how exactly a variable looks like.

Doesn'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.

lofaszvanitt1 reply#
Nop.