Python is a particularly clean and sugary language, thanks to its many convenience features. In this post I will go into context managers in Python, how to use them, where to find them, and how to write your own ones.
read more “Python Context Managers in Depth”Tag: metaprogramming
Why Do You Need Decorators in Your Python Code
Python is praised for its clarity and syntactic sugariness. In this article, I will teach you to use decorators in Python to make your code readable and clean.
read more “Why Do You Need Decorators in Your Python Code”Why Python Written In Python is Faster Than Regular Python
Let’s be honest: Python is slow. When I say Python, I mean CPython, it’s reference, C-based, implementation. This is where PyPy comes into play. This is a Python runtime, written in Python (!), which performs 4.4 times faster than CPython. How? Read ahead.
read more “Why Python Written In Python is Faster Than Regular Python”Abstract Classes and Meta Classes in Python
Abstract classes (or Interfaces) are an essential part of an Object-Oriented design. While Python is not a purely OOP language, it offers very robust solutions in terms of abstract and meta classes.
read more “Abstract Classes and Meta Classes in Python”