Icecream
Never use print() to debug again..!
$ pip install icrcreamprint(foo('123')) 또는
print("foo('123')", foo('123'))을 입력해서 입력값, 출력값을 나타낼때,
from icecream import ic
if(foo(123))를 하게되면
ic| foo(123): 456 라는 결과값이 나온다.
비슷하게,
d = {'key': {1: 'one'}}
ic(d['key'][1])
ic| d['key'][1]: 'one'
class klass():
attr = 'yep'
ic(klass.attr)
ic| klass.attr: 'yep'
def foo():
ic()
first()
if expression:
ic()
second()
else:
ic()
third()
ic| example.py:4 in foo()
ic| example.py:11 in foo()Last updated