Lim Woojaejaylog.hashnode.dev·13 hours ago[Python] Leveraging __name__ for Efficient Python Module OrganizationIntroduction If you have used python before, you may have seen a code snippet like this: if __name__ == '__main__': # do something This code is so simple and short, but do you fully understand what it means, and why it is so important to avoid e...Pythonbuilt in variable
Anushka Kishorkishoranushka.hashnode.dev·Jun 29, 2024Dunder in pythonDunder stands for "double underscore." In Python, these are special methods (or functions) that have double underscores at the beginning and end of their names. They're also called "magic methods." Imagine you're playing with a special toy. It has bu...Python
Maxat Akbanovmaxat-akbanov.com·Apr 16, 2024Python 101: Special variablesPython uses several special variables, often referred to as "dunder" (double underscore) variables or "magic methods" in the context of OOP, that have specific meanings and are used by the Python interpreter for particular purposes. This double under...29 readspythonPython
Ikubanni Paulheccubernny.hashnode.dev·Dec 6, 2022What is Python Dunder?In Python, the term "dunder" is short for "double underscore" or "dunder mifflin", and it is often used to refer to special methods that have two leading and two trailing underscores. These methods are also known as "magic methods" because they allow...1 like·188 readsMethod