Learn how to change CPython internals to accept new syntax and features. This post adds a Ruby feature to Python. | Continue reading
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
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
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
An essay and study of why you should ‘start where you are. Use what you have. Do what you can.’ | Continue reading
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
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
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
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