I’m learning about object-oriented programming in Python, and I’ve written this simple class with an __init__
method to initialize the object:
However, when I create an instance of MyClass
, it seems like the __init__
method isn't being called, and I don’t understand why. Could someone explain why this might happen? Are there any common pitfalls with the __init__
method that I should watch out for?