Weekly Shaarli

All links of one week in a single page.

Week 44 (November 1, 2021)

Tips for debugging with print() - Adam Johnson

Quelques tips pour debugger du code python avec print(), notamment:

  • Debug variables with f-strings and =: print(f"{myvar=}")
  • Use locals() to debug all local variables: print(locals())
  • Use vars() to debug all of an object’s attributes: print(vars(myobject))