title: TypeError: method() takes exactly 2 arguments (3 given)
body: <p>Here is a code:</p>
  
  <pre><code>class Child(object):
      def chunks(l, n):
          """ Yield successive n-sized chunks from l.
          """
          for i in xrange(0, len(l), n):
              yield l[i:i+n]
  
  k= range(1, 10)
  print k
  print Child().chunks(k,2)
  </code></pre>
  
  <p>When I execute this code, python throws following error:</p>
  
  <blockquote>
    <p>[1, 2, 3, 4, 5, 6, 7, 8, 9] </p>
    
    <p>Traceback (most recent call last): </p>
    
    <p>File
     "/home/Sample.py", line 19, in </p>
    
    <p>print Child().chunks(k,2) </p>
    
    <p>TypeError: chunks() takes exactly 2 arguments (3 given)</p>
  </blockquote>
  
  <p>Please find my snippet !</p>