decorators in python with examples

Python has some excellent features which provide you confidence. One of them is decorators. Decorators are used to modify the behaviour of a function or a class. In this article, we will learn how to use decorators in Python. What are decorators? In programming, decorators are functions that enhance the functionality of another function by receiving it as input, modifying it, and then returning a new function. This process is known as metaprogramming, as one part of the program modifies another part during compilation....

June 23, 2023 · 3 min · mrturkmen

from interview question to enlightenment: metaclasses in python

It was another interview that I had with a company, and I was asked about metaclasses in Python. Up to now, I did not have a requirement to use them, it leads to have a superficial idea about them but not exactly know what they are, therefore decided to do some research and write a short blog post about them. What are metaclasses? In Python, everything is an object. Classes are objects too....

June 18, 2023 · 4 min · mrturkmen

github-actions: complain messages to a company in automated way

I am alive !!! Right, I did not post anything for long time and could not imagine that this will be my next blog post after long time, but it is indeed. This is a story about a company who hold the product (- sent for warranty -) for five months and did not respond any emails. Let’s start from the beginning of the story, the product itself is not important, instead how they (- company -) approached to situation is important....

February 25, 2022 · 4 min · mrturkmen