Python - What are Static and Class Methods?
Have you ever seen some Python code and wondered what @staticmethod and @classmethod do ? Well, let me explain ... @staticmethodA static method is a method that knows nothing about the class or instance itwas called on. The class instance, therefore, is NOT passed in as an implicitfirst argume…
Python - What does Property() do ?
What is Property()?When reading Python code you may have seen the following: class MyClass(object): def __init__(self): pass @property def do_something(self): return True The purpose of this function is to create a property of a class. A propertylooks and acts li…
Python - Threading vs Multiprocessing
IntroductionIn this article we will look at threading vs multiprocessing within Python, andwhen you should use one over the other. TL;DR * What is the GIL (Global Interpreter Lock)? - Prevents more than 1 thread being run within a single CPython Interpreter/process. * Why do we need the GIL?…