Re: [Tutor] Type() Getting Type Error

2007-11-09 Thread Alan Gauld
"Chernev Chernev" <[EMAIL PROTECTED]> wrote > So in the script I write: > print type([object] > > This bombs, and I get > "TypeError: 'str' object is not callable' > In the interactive, 'type([object])' works fine. Looks like you have defined type as a local variable somewhere in your script

Re: [Tutor] Type() Getting Type Error

2007-11-09 Thread Chernev Chernev
On Nov 9, 2007 10:09 AM, Kent Johnson <[EMAIL PROTECTED]> wrote: > > So in the script I write: > > print type([object] > > > > This bombs, and I get > > "TypeError: 'str' object is not callable' > > > Probably you have a variable named 'type' in your script that is hiding > the builtin 'type' objec

Re: [Tutor] Type() Getting Type Error

2007-11-09 Thread Evert Rol
On 9 Nov 2007, at 14:48 , 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' > > I've also tried > x = type([object]) > print x > > Same

Re: [Tutor] Type() Getting Type Error

2007-11-09 Thread Kent Johnson
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

[Tutor] Type() Getting Type Error

2007-11-09 Thread Chernev Chernev
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 missi