Magic Methods
Magic Methods So by a super cool and awesome and really amazing developer who I work with sometimes, I have been set the task of trying to figure out how we would go about sorting two instances of the same class - based on the value of one of their attributes. magic methods - taylor swift folklore aesthetic and vibe So what are magic methods? Magic methods are "special methods describing how certain objects should behave." They are "dunder methods" (sounds like something out of a fantasy novel?) like __init__ , __repr__ and __lt__ . I came across these when I was first learning Python/Django for my job interview. These methods apparently indicate that these methods "shouldn't be called directly by the programmer, they are normally called by the interpreter itself." Source: https://blog.cambridgespark.com/magic-methods-a8d93dc55012 There is a thing called __new__ that comes before the __init__ method, but we are not going into this today. I am not g