Here is a complete list of all of our courses and articles.

Filter by topic
pattern matching
functional programming
practical example
advanced
beginner
best practices
intermediate
files

Courses

Mastering Structural Pattern Matching

In this course you’ll learn how to use Python 3.10’s new Structural Pattern Matching feature, and why Python would suddenly adopt a complex feature usually reserved for functional programming languages.
advanced
pattern matching
functional programming

Articles

Python Pattern Matching Examples: ETL and Dataclasses

Python’s new Structural Pattern Matching is useful in a wide range of roles, including ETL and data processing. Learn how to combine it with JSON, REST APIs and Python’s dataclasses.
pattern matching
functional programming
practical example
advanced

Watch out for mutable defaults in function arguments

You can set default values for function or method arguments, but think twice before you pick something that is mutable or can cause side-effects.
beginner
best practices

Separating type-specific code with single­dispatch

Have you ever found yourself writing a litany of if-elif-else statements peppered with isinstance() calls? functools.singledispatch can help you separate your concerns and make your code easier to test.
advanced

Truthy and Falsy Gotchas

Python developers quickly learn that almost everything in Python evaluates to True or False in a boolean context. However, there are a number of gotchas that can cause logic errors in your code if you are not vigilant.
intermediate
best practices

Common Path Patterns

The pathlib module, introduced in Python 3.4, added a class-based approach to Path and file management. Most users of Path never venture beyond the basics of joining paths together. That’s a shame as the motivations behind the pathlib module is to serve as more than just a replacement for the myriad functions in os and os.path.
files

Assertions and Exceptions are not the same

The assert statement is not a stand-in replacement for raising exceptions. Wrongful application of assertions is a common mistake beginners make, and it can result in serious logic errors in your code.
intermediate
best practices

Be Inspired Get Python tips sent to your inbox

We'll tell you about the latest courses and articles.

Absolutely no spam. We promise!