gett error message: "TypeError: 'int' object is not callable"

Rhodri James rhodri at wildebst.demon.co.uk
Thu Jul 9 19:41:59 CEST 2009


On Thu, 09 Jul 2009 17:06:45 +0100, Tom Kermode <tkermode at gmail.com> wrote:

> Hi,
>
>    Do you know a good way to avoid running into this problem?  It
> makes sense to suggest not calling variables the same names as
> built-in functions, but that's hard for a new python programmer who
> doesn't already know what all the built-in functions are. Over time a
> programmer will learn which names to avoid, but it's a bit of a
> pitfall early on.

It's only really a pitfall if you try to use the built-in after you've
redefined it.  That's the thing to keep an eye open for.

-- 
Rhodri James *-* Wildebeest Herder to the Masses



More information about the Python-list mailing list