Preferred way of resetting a class in Python
Both are correct but the semantics are not implemented the same way. To be able to reset an instance, I would write this (I prefere to call a custom method from __init__ than the opposite, because __init__ is a special method, but this is mainly a matter of taste): class Foo: def __init__(self): self.reset() def … Read more