Class Assignment Problems
<p>Why is PyDev giving me this error: "Class variable undefined" when I try to implement a simple class for an inversion counting algorithm? Here's my code:</p>

<pre><code>from collections import deque

Class inversionCount:

    def __init__(self, n):
        self.n = n
    def inversionMergeSort(m, n):
        print m
        if len(m) &lt;= 1:
            n = 0
            return (m, n)
        half = len(m)/2
        left = m[0:half]
        right = m[half:]
        left = mergeSort(left)
        right = mergeSort(right)
        return inversionSort(left, right)

    def inversionSort(left, right, n):
        leftQueue = deque(i for i in left)
        rightQueue = deque(j for j in right)
        orderedList = []
        while len(leftQueue) &gt; 0 or len(rightQueue) &gt; 0:
            if len(leftQueue) &gt; 0 and len(rightQueue) &gt; 0:
                if leftQueue[0] &lt; rightQueue[0]:
                    orderedList.append(leftQueue[0])
                    leftQueue.popleft()
                else:
                    orderedList.append(rightQueue[0])
                    if len(leftQueue) &gt; 1:
                        self.n += len(leftQueue)
                    rightQueue.popleft()
            elif len(leftQueue) &gt; 0:
                orderedList.append(leftQueue[0])
                leftQueue.popleft()
            elif len(rightQueue) &gt; 0:
                orderedList.append(rightQueue[0])
                rightQueue.popleft()
        return (orderedList, n)
</code></pre>

<p>yet PyDev is failing to recognize that inversionCount is indeed a class. Any thoughts? </p>
