/k0nzeProgamming, Computer Science, and Everything in Between 2024-02-22T14:23:58+01:00 k0nze / Konstantin Lübeck / Jekyll © 2024 k0nze / Konstantin Lübeck /assets/img/favicons/favicon.ico /assets/img/favicons/favicon-96x96.png Python’s Abstract Base Classes (ABC) and Interfaces Explained (With Code Snippets)2024-02-22T13:00:00+01:00 2024-02-22T13:00:00+01:00 /posts/python-interfaces-abstract-classes/ k0nze When you get started with object-oriented programming, you will come across interfaces and abstract classes. Especially languages like Java or C# make use of those two concepts a lot to structure complex programming projects and to leverage abstraction. However, in Python, interfaces and abstract classes aren’t part of the standard languages’ definition. In this article, you will learn what i... Python Decorators, A Beginners Guide (With Code Examples)2024-02-15T13:00:00+01:00 2024-02-15T15:40:41+01:00 /posts/python-decorators/ k0nze When looking through Python code of other programmers or though the code of Python modules, you might have come across functions or methods which have a string on top of their signature starting with a @. Those markers on top of functions and methods are called decorators and in this article you are going to learn how Python decorators work and how they can help you to improve your Python co... Python := / Walrus Operator Explained in Simple Terms (With Code Snippets)2024-02-08T13:00:00+01:00 2024-02-04T18:56:30+01:00 /posts/python-walrus-operator/ k0nze Since the version 3.8 Python has a new operator, officially called the assignment expression operator :=, because of its looks the Python community gave it the name walrus operator. In this article, you will learn what the walrus operator does, how to use it, and how to improve the quality of your code with the walrus operator. Python Assignments and Expressions When a variable (in any prog... Python *args, **kwargs, and Star/Asterisk-Operator Explained in Simple Terms (With Code Snippets)2024-01-29T12:00:00+01:00 2024-01-30T07:03:27+01:00 /posts/python-args-kwargs/ k0nze You just discovered a cool Python module that helps you to implement your program much more elegantly or even faster and while you are digging through the code and documentation you come across *args and **kwargs in functions and classes of the module and ask yourself what do those two cryptic things do? In this article, you will learn the meaning behind the python * and ** operators, not to ... A Python Program that Self-destructs but Makes a Clone of Itself Just in Time to Stay Alive2024-01-22T14:00:00+01:00 2024-01-30T07:03:27+01:00 /posts/python-program-self-destruct-clone/ k0nze This article shows how to write a Python program which destructs itself when it is called, by deleting its own source code, and then creates a copy of itself just to call this copy to “live” on forever while reproducing itself. You might ask, why would anyone ever need such a program? I must admit that such a program doesn’t have any practical value. However, it is an interesting challenge wh...