IceCream: Never use print() to debug again

IceCream — Never use print() to debug again

Do you ever use print() or log() to debug your code? Of course you do. IceCream, or ic for short, makes print debugging a little sweeter.

IceCream is well tested, permissively licensed, and supports Python 2, Python 3, PyPy2, and PyPy3.

Inspect Variables

Have you ever printed variables or expressions to debug your program? If you’ve ever typed something like

or the more thorough

print("foo('123')", foo('123'))

then ic() is here to help. With arguments, ic() inspects itself and prints both its own arguments and the values of those arguments.

from icecream import ic

 

 

 

To finish reading, please visit source site