Co-authored-by: nilbuild <4921183+nilbuild@users.noreply.github.com>
9 lines
888 B
Markdown
9 lines
888 B
Markdown
# Methods and Dunder Methods
|
||
|
||
Methods are functions defined within a class that describe the behaviors or actions an object can perform. Dunder methods, short for "double underscore" methods, are special built-in methods—such as `__init__` or `__str__`—that allow you to define how your objects interact with Python’s built-in operations and syntax. By implementing these methods, you can customize how objects are initialized, represented as strings, compared, or used with mathematical operators.
|
||
|
||
Visit the following resources to learn more:
|
||
|
||
- [@article@Method vs Function in Python](https://www.tutorialspoint.com/difference-between-method-and-function-in-python)
|
||
- [@article@Python - Magic or Dunder Methods](https://www.tutorialsteacher.com/python/magic-methods-in-python)
|
||
- [@article@Python super() and init: Multiple Inheritance Guide](https://roadmap.sh/python/super-init) |