#ProgressToday: Finished reading chapter 3 "Pythonic Syntax and Common Pitfalls" in #MasteringPython. The common pitfalls didn't surprise me as much now. Learned of the "walrus operator" and "switch statement". Installed #pycodestyle, 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
#ProgressToday: Finished reading chapter 10 "Testing and Logging" in #MasteringPython. Used #Python 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
#ProgressToday: Finished reading chapter 9 "Documentation" in #MasteringPython. 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