title: Python 3: object() takes no parameter
body: <p>I have a class inside a file called <code>Weapons.py</code> called <code>Pistol</code> that looks like this:</p>
  
  <pre><code>class Pistol(object):
      MAXAMMO = 6
      def __init__(self, ammo):
          if(ammo &lt;= self.MAXAMMO):
              self.ammo = ammo
      def shoot(self):
          if(ammo &gt; 0):
              accuracy = random.randint(0, 3)
              return 3 * accuracy
              ammo -= 1
          else:
              print("No ammo")
  </code></pre>
  
  <p>And a class called <code>ColtM1911</code> that inherits from <code>Pistol</code>.  It looks like this:</p>
  
  <pre><code>class ColtM1911(Pistol):
      MAXAMMO = 7
      def __init__(self, ammo):
          self.ammo = 7
  </code></pre>
  
  <p>When I run:</p>
  
  <pre><code>import Player
  import SetUp
  from Utils import *
  import pickle
  import TitleAnimation
  import os
  import SaveLoad
  from Weapons import *
  
  gun = ColtM1911(5)
  </code></pre>
  
  <p>In another file it gives me <code>"TypeError: object() takes no parameters"</code>  When trying this in the shell it worked, so I suspect it is to do with having it in a separate file.</p>
  
  <p>The full traceback is,</p>
  
  <pre><code>Traceback (most recent call last):
    File "C:\Users\James\Documents\game.py", line 3, in &lt;module&gt;
      gun = Weapons.ColtM1911(5)
  TypeError: object() takes no parameters
  </code></pre>