Mystery of Mutable Default Arguments in Python, How not to pass default arguments in Python and how to handle them properly? (more…)
Read more »
Mark functions as async. Call them with await. All of a sudden, your program becomes asynchronous – it can do useful things while it waits for... (more…)
Read more »
Pytest has a lot of features, but not many best-practice guides. Here’s a list of the 5 most impactful best-practices we’ve discovered at NerdWallet. At NerdWallet, we have a lot… (more…)
Read more »
[Edit: A significantly expanded version of this series appears as a chapter in The Architecture of Open Source Applications, volume 4, as A Python … (more…)
Read more »
Python provides some special function having __ as prefix and suffix in the name, which is also known as Magic method or Dunder method. This function is automatically invoked when the associated operator is used. For example, when + is used, the magic me... (more…)
Read more »