Make it easy: Debugging Python Code with the IceCream Library
IceCream is a Python library that makes debugging easy and readable with minimal code. It includes printing expressions, variable names, function names, line numbers, file names, and much more that is useful to the developer when finding errors and fixing them. Instead of using print() or log() to debug code, the IceCream library has similar functions. In particular, ic() is similar to print(), but it prints the names of expressions, variables, and their values, and is 60% faster. The IceCream library more fully displays the examined data structures, has a rich output syntax, and can also include program context: file name, line number, and parent function.
IceCream's open source code is available on Github. The library supports Python 2, Python 3, PyPy2 and PyPy3, and can also be used in other programming languages: Dart, Rust, Node.js, C++, PHP, Go, Ruby, Java, R, Lua, Clojure(Script) and Bash .
Usage examples: https://towardsdatascience.com/introducing-icecream-never-use-print-to-debug-your-python-code-again-d8f2e5719f8a
Post #506
596