TypeError

Fredrik Lundh effbot at telia.com
Thu Oct 26 11:33:19 EDT 2000


joonas wrote:
> The code that did the error is shown below.
> ##########
> speedgear = first - second
> ##########

>>> speedgear = first - second
Traceback (innermost last):
  File "<stdin>", line 1, in ?
NameError: first

(the fine manual says TypeErrors are "Raised when a
built-in operation or function is applied to an object of
inappropriate type".  Maybe 'first' and 'second' contain
things that can't be subtracted from each other?  hint:
you can use float() and int() to convert from strings to
numbers)

</F>





More information about the Python-list mailing list