[Tutor] something is fundamentally wrong...

Martin Walsh mwalsh at mwalsh.org
Sat Aug 9 21:59:00 CEST 2008


Joshua Nikkel wrote:
> IDLE 1.2.2      ==== No Subprocess ====
>>>> s = 'supercalifragilisticexpialidocious'
>>>> len(s)
> Traceback (most recent call last):
>   File "<pyshell#1>", line 1, in <module>
>     len(s)
> TypeError: 'str' object is not callable

My guess would be that you've reassigned the name 'len' to some other
object, in this case a string. Does the error persist after you restart
IDLE (or Restart Shell from the Shell menu)?

HTH,
Marty


More information about the Tutor mailing list