The biggest Python topics of 2023 ›

Python Operator Overloading and Lambda Functions

Python's operator overloading and function handling features are explored in this set of documents, illustrating how operators can be customized using dunder methods and how higher-order functions can enhance code readability and reusability. Examples include using the operator module for functional programming and understanding the key parameter in Python functions.

Higher Order Functions in Python Article

Higher-order functions in Python take functions as arguments, or return them as results, making code more readable and reusable. This brief article shows you the concept and highlights examples in the standard library.

Real-World match/case Article

The match statement was added in Python 3.10. This article covers a real-world example use case and shows its power.

What Are Lambda Expressions? Article

This post teaches you what lambda expressions are and how they get used in Python. It shows several examples and also covers when to avoid them.

Working With the Python operator Module Article

In this tutorial, you’ll explore the Python operator module and its role in functional programming. You’ll code several examples of using both operator-equivalent and higher-order functions in programs.

Recursion in Python Article

A recursive function is one that calls itself. In this video course, you’ll see what recursion is, how it works in Python, and under what circumstances you should use it.

What Is *args and How Do You Use It? Article

This article explains what *args means in Python and how to use it in your own functions.

Say It Again: Values Not Expressions Article

Sometimes you can explain a simple thing for the thousandth time, and come away with a deeper understanding yourself. It happened to Ned the other day with Python mutable argument default values.

The Fanout Pattern Explained Article

The fanout pattern is one where a single task replaces itself with a variable number of other tasks. This article covers how that happens in Celery and what that entails.

The Key to the key Parameter in Python Article

A parameter named key is present in several Python functions, such as sorted(). This article explores what it is and how to use it.

Divmod for Unit Conversions Article

Python’s built-in divmod() provides the quotient and remainder of two numbers. This kind of division occurs frequently when calculating unit conversions. This article shows some examples.

What Are Python Asterisk and Slash Special Parameters For? Article

In this tutorial, you’ll learn how to use the Python asterisk and slash special parameters in function definitions. With these symbols, you can define whether your functions will accept positional or keyword arguments.

Overloading Arithmetic Operators With Dunder Methods Article

This article shows you how to overload the arithmetic operators in Python with dunder methods. It includes examples for add, radd, and iadd, while also outlining how to deal with error conditions in dunder methods.

Python’s in and not in Operators: Check for Membership Article

In this tutorial, you’ll learn how to check if a given value is present or absent in a collection of values using Python’s in and not in operators, respectively. This type of check is known as membership test in Python.

Operator Overloading in Python Article

Python is an object-oriented programming language and one of its features is that it supports operator overloading, learn how to overload common operators such as addition, subtraction, comparison, and more.

A Practical Use for &= Article

Can you already picture real use cases for this little Pythonic gem? Learn about the bitwise-and-equal operator and where it can be used.

Dictionary Dispatch Pattern in Python Article

The dictionary dispatch pattern uses a dict to store references to functions, allowing you to replace long if/else statements or as an alternative to the match statement. Read on for how and where to use it.