[Tutor] Type() Getting Type Error

Chernev Chernev chernevik at gmail.com
Fri Nov 9 15:48:01 CET 2007


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'

I've also tried
x = type([object])
print x

Same thing.

In the interactive, 'type([object])' works fine.

What am I missing here?


More information about the Tutor mailing list