title: Max Points on a Line Compile Error
body: <p>Below is my python code to the oj problem: "Max Points on a Line", I test it locally with lots test points and it seems ok, but the oj reply "Compile Error".</p>
  
  <p>Is there anything wrong I missed?</p>
  
  <pre><code>import operator
  
  class Solution:
      # @param points, a list of Points
      # @return an integer
      def maxPoints(self, points):
          pointset = set(points)
          if len(pointset) &lt; 3:
              return len(points)
          else:
              pointdict ={pkey:points.count(pkey) for pkey in pointset}
              count = 0
  
              while len(pointset) &gt; 1:
                  point1 = pointset.pop()
                  point2set = pointset.copy()
  
                  while point2set:
                      point2 = point2set.pop()
                      point3set = point2set.copy()
  
                      lineset = {point1, point2}
  
                      if point3set:
                          for point3 in point3set:
                              if (point1.x-point2.x)*(point2.y-point3.y) == (point2.x-point3.x)*(point1.y-point2.y) :
                                  lineset.add(point3)
                                  point2set.remove(point3)
  
                      linecount = reduce(operator.add, [pointdict[p] for p in lineset])
  
                      if linecount &gt; count: 
                          count = linecount
              return count
  </code></pre>