What If Python Had This Ruby Feature?

Learn how to change CPython internals to accept new syntax and features. This post adds a Ruby feature to Python. | Continue reading


@miguendes.me | 2 years ago

Different Ways to Flatten a List of Lists in Python

In this post, we’ll see how we can flatten a list in 5 different ways. Each method has pros and cons, and varied performance. By the end of this tutorial, I hope you’ll be able to identify the most appropriate solution for your problem. The Python ve... | Continue reading


@miguendes.me | 3 years ago

Design Patterns That Make Sense in Python: Simple Factory

In the first post of this series, I'll talk about Design Patterns that make sense in Python. We'll see how to implement them and how they are used in the standard library and other third-party packages. In this post, we'll go over the Simple Factory ... | Continue reading


@miguendes.me | 3 years ago

Examples to Help You Master Python's F-Strings

In this post, I'll show you what I consider the most important bits about Python's f-strings. You will learn several different ways to format a string using f-strings, completely guided by examples. In total, you'll see 73 examples on how to make the... | Continue reading


@miguendes.me | 3 years ago

How to Shoot Yourself in the Foot with Python. Part 1

An essay and study of why you should ‘start where you are. Use what you have. Do what you can.’ | Continue reading


@miguendes.me | 3 years ago

5 Hidden Python Features You Probably Never Heard Of

In this article, I’m going to show you the top 5 unusual features you can find in Python. Experienced Python developers might recognize some of them. However, others will still be unknown. Regardless, I find all of them very cool.Table of Contents... | Continue reading


@miguendes.me | 3 years ago

Everything You Need to Know About Python's Namedtuples

In this article, I will discuss the most important aspects of namedtuples in Python. We’ll start from the very basics and move up to more complex concepts. You’ll learn why you should use them and how they can make your code cleaner. At the end of th... | Continue reading


@miguendes.me | 3 years ago

How to Test API Client Applications in Python

In this tutorial, we’ll learn how to unit test code that issues HTTP requests in Python. Unit tests are meant to test a single unit of behavior. A well-known rule of thumb is to isolate code that reaches external dependencies. For instance, when test... | Continue reading


@miguendes.me | 3 years ago

How to Test Complex Data in Python

In this tutorial, we'll learn how to test complex data structures in Python. Examples of such data include images, nested dictionaries, dictionaries of numpy arrays and even file contents. Learning how to test complex data is a very helpful skill, es... | Continue reading


@miguendes.me | 3 years ago