TypeError: both int and float
<pre><code>class Account(object):
    def __init__(self,holder, number, balance, credit_line = 1500):
        self.holder = holder
        self.number = number
        self.balance = balance
        self.credit_line = credit_line

    def deposit(self, amount):
        self.balance = amount
    def withdraw(self, amount):
        if(self.balance - amount &lt; -self.credit_line):
           return False
        else:
            self.balance -= amount
            return True

    def balance(self):
        return self.balance
    def holder(self):
        return self.holder

    def transfer(self, target, amount):
        if(self.balance - amount &lt; -self.credit_line):
           #coverage insufficient
           return False
        else:
             self.balance -= amount
             target.balance += amount
             return True 
Guido = Account("Guido", 10 ,1000.50)
Guido.balance()
-------------------------------------------------------------------------


Traceback (most recent call last):
  File "Account.py", line 31, in &lt;module&gt;
    Guido.balance()
TypeError: 'float' object is not callable
</code></pre>

<p>You are overriding method <code>balance</code> in your <code>__init__</code> method. You could either change the field name to <code>_balance</code> or just remove <code>balance</code> method and use <code>Guido.balance</code>.</p>

<p>Also note, that you should name your variables starting with lowercase character (i.e. <code>guido = Account(...)</code>, not <code>Guido</code>)</p>

python python-2.7