How to reset a class instance in python?
<p>I am trying to return the fibonacci numbers but it prints 2 instead of 1 after calling start.next().next(). How can I solve this issue?</p>

<pre><code>class Fib():

    def __init__(self):
        self.value = 0



    def next(self):

        if self.value == 0:
            self.total = 1
            self.previous = 0
            self.value = 1

        else:
            print(self.previous)
            self.value = self.total + self.previous
            hold = self.total
            self.previous, self.total = hold, self.value


        return self

    def __repr__(self):
        return str(self.value)
</code></pre>