Hi Paul,

----- Original Message ----- 
From: "Paul Hendrick" <[EMAIL PROTECTED]>
To: <zope@zope.org>
Sent: Friday, May 13, 2005 4:06 PM
Subject: [Zope] Float object not callable (newbie question)


> hi all,
> I'm trying to write a simple app which takes a name, bank balance,
> interest rate and returns the balance once 1 years interest has been
> added. I'm getting the error that float object is not callable.
> i can't figure out where i'm going wrong :S
>
> my code is below(getDetails, showDetails,doStuff.py), thanks for any
> input!
> paul.
>
> <html>
> <body>
>
> <form action="showDetails" method=post>
>  <input name="name:str"> NAME<br>
>  <input name="balance:float"> BALANCE<br>
>  <input name="interestRate:float"> INTEREST RATE<br>
>  <input type="submit" value="calculate">
> </form>
>
> </body>
> </html>
> ------------------
> <html>
> <body>
>
> <span tal:define="name request/name;
>                   balance request/balance;
>                   rate request/interestRate">
>  <span tal:content="python: here.doStuff(name,balance,rate)"></span>
> </span>
>
> </body>
> </html>
> --------------
> years = 1
> newBal = balance( balance*(rate*years))

You seem to be calling a function here called 'balance' which is the name of
the parameter.
Should it not be just:
newBal = balance*(rate*years)


>
> returnList = [name,newBal]
>
> return returnList
>
>

Hope that helps,
Brian

_______________________________________________
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to