mochatek.hashnode.devIterators in PythonOne of the key features of Python is its support for iterable objects and iterators. In this article, we will take a closer look at what they are and how they can be used. Iterable Object An iterable object in Python is an object that can be iterated...Feb 19, 2023·5 min read
mochatek.hashnode.devMonkey Patching in PythonMonkey patching refers to modifying or updating a piece of code or class or any module at runtime. With that, we can change the behaviour or working of a class/ module dynamically without affecting the original source code. This can be useful in a v...Feb 5, 2023·3 min read
mochatek.hashnode.devContext Manager in PythonThe usage of resources such as files, locks, database connections etc. is very common in a program. Since these resources are limited in supply, we should always make sure to release them after usage. If not, then the program will keep the resources ...Jan 29, 2023·5 min read
mochatek.hashnode.devDecorator in PythonIn the article: Functions as Objects, we had seen that Python functions can accept another function as a parameter and can also return a function as its return value. Such functions that operate on another function are called Higher-Order Functions. ...Jan 15, 2023·5 min read
mochatek.hashnode.devClosure in PythonIn the previous article, we saw that we can define functions inside another function, and doing so would create the enclosing scope , using which we would be able to access variables/names from the local scope of the outer function, from inside the i...Jan 8, 2023·7 min read