How do I call a list or object defined in another instance into another instance?
<pre><code>class Sieve:
def __init__(self, digit):
    self.digit = []
    numbers = [True]*digit
    if digit &lt;= -1:
        raise RuntimeError("Cannot use negative values.")
    numbers[0] = False
    numbers[1] = False

def findPrimes(self):
    for i in range(len(self.digit)):
        if numbers[i]:
            j = (i+i)
            while (j &lt; len(numbers)):
                numbers[j] = False
                j += i
                print(numbers)
</code></pre>

<p>This is my first post on stackoverflow and after trying for a long time figuring out what to do and searching the internet, I'm afraid I have to ask here. 
My program is supposed to find all prime numbers given any number in the initial class. I was trying to check my findPrimes(), but I was having a difficult time trying to get the values to print. I keep getting the error "numbers is not defined". Am I supposed to define it outside of findPrimes? Or is there a specific way I can call numbers from <strong>init</strong> to findPrimes? Thank you!</p>

<p>According to your post, your functions are unindented, so they're defined outside of your class.</p>

<p>Remember python relies heavily on indenting due to the lack of things like braces.</p>

<p>Also, your variable are local to your functions, and aren't properties of your class. You need to add them to your class by prepending them with <code>self.</code> (like you did with <code>self.digit</code>).</p>

<p>so <code>self.numbers = ...</code> instead of <code>numbers = ...</code></p>

python sieve