Pydon'ts

Write elegant Python code

A series of articles that teaches you how to make the best use of the core Python features. The Pydon'ts are available as an e-book that you can read for free below.

  1981

This Pydon't walks you through the usages of the __name__ dunder method and how to use it effectively.

  6156

The purpose of this Pydon't is to show you what underscores are used for in Python, and to show you how to write more idiomatic code with them.

  2480

In this Pydon't we will take a look at the reduce function, which used to be a built-in function and is currently in the functools module.

  4115

In this Pydon't we explore what Boolean short-circuiting for the and and or operators is, and how to use this functionality to write more expressive code.