On Mon, 01 Jun 2009 11:40:50 +0100, Visco Shaun <visc...@gmail.com> wrote:
when I was executing the below code I got "TypeError: 'int' object is not callable" exception. Why is it so? if type(c) == type(ERROR): c can be a string or an integer representing an error
In the absence of the rest of your code this is a wild guess, but have you used `type` as a variable? If you have, that would mask the builtin name `type`, and would give you this error assuming `type` contains an integer. Moral: don't use builtin names for variables. -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list