[Tutor] str object is not callable
Devin Jeanpierre
jeanpierreda at gmail.com
Tue Jul 10 17:33:41 CEST 2012
On Tue, Jul 10, 2012 at 10:56 AM, Chris Hare <chare at labr.net> wrote:
> The input to the function in the larger program is the same as the first test in the small script that works -- "admin".
>
> As a side note -- the rstrip call is also broken, although the string module is imported. I just can't figure out why this code works in one context and not in another.
I suspect you defined "bool" somewhere to be a string. That, or else
you passed in a string as the search argument. Unfortunately Python
doesn't tell you which expression raised the exception, but certainly
it's one of those two.
-- Devin
More information about the Tutor
mailing list