[Tutor] Type() Getting Type Error

Kent Johnson kent37 at tds.net
Fri Nov 9 16:09:03 CET 2007


Chernev Chernev wrote:
> I'm debugging a script and want to check the type of an object.
> 
> So in the script I write:
> print type([object]
> 
> This bombs, and I get
> "TypeError: 'str' object is not callable'
> 
> What am I missing here?

Probably you have a variable named 'type' in your script that is hiding 
the builtin 'type' object.

Kent


More information about the Tutor mailing list