Xiuwen · @__icoder__
84 followers · 322 posts · Server sfba.social

: Finished reading chapter 3 "Pythonic Syntax and Common Pitfalls" in . The common pitfalls didn't surprise me as much now. Learned of the "walrus operator" and "switch statement". Installed , tried it on a couple of my python files, and fixed the issues to get a clean pass.

Going forward, I'll do these:

I. Use pycodestyle to scan my python files as I work on them;

II. Look for opportunities to use "walrus operator" and "switch statement".

#ProgressToday #masteringpython #pycodestyle #python

Last updated 2 years ago

Xiuwen · @__icoder__
80 followers · 297 posts · Server sfba.social

: Finished reading chapter 10 "Testing and Logging" in . Used doctest and logging modules a little as in the examples. Decided to take the minimalist approach here:

I. Start using logging module with basicConfig in my scripting;

II. Look for opportunities to practice doctest also in my scripting.

#ProgressToday #masteringpython #python

Last updated 2 years ago

Xiuwen · @__icoder__
78 followers · 289 posts · Server sfba.social

: Finished reading chapter 9 "Documentation" in . Used Sphinx with a simplest project and gained a little experience of current, real-world documentation. Decided I'll go a minimalist approach:

I. For my external-facing functions or classes , I'll write at least a one-liner docstring to start with.

II. For my Jupyter notebooks, in addition, I'll use markdowns to comment on requirements, input data, data cleaning, plots, etc.

#ProgressToday #masteringpython #python

Last updated 2 years ago