I’ve written Python as work while I was new to Python before. My Python experience has been grown, so I got used to writing Python code. Meanwhile, motivation to improve my code made me dive into a bit deeper Python world. It could step my eye up in reading other persons’ code, reviewing them, making my code clear.
“Pythonの黒魔術” (Japanese) appeared in my Twitter TL. It seemed a proper one for my purpose.
The book helped me to step into Python processing and basis. For example, I did not know List and Dict should not use as a default value. It could lead below magic.
def f(a=[]):
a.append(1)
f() #=> [1]
f() #=> [1, 1]
f() #=> [1, 1, 1]
Fortunately, I haven’t written such code, but potentially such code was in my code…
globals() is also a good example. It helped me much if I had known it in my debug before… Although I got some new knowledge from the book, 60% to 70% of the book was what I already knew.
One thing if I could leave a comment, hopefully, I wanted to read the book in English 🙂 But thanks for the book, overall.