[Tutor] TypeError
Kent Johnson
kent37 at tds.net
Sun Feb 3 22:21:27 CET 2008
Seon Kang wrote:
> When i tried to run my program, i was given this message
> (this is the message in part)
>
> file "C:Python25\lib\site-packages\livewires\games.py", line 503, in_tick
> self.position = ((self._x + self._dx), (self._y + self._dy))
> TypeError: unsopported opernad type(s) for +: 'int' and type'
>
> What is the nature of my problem?
It seems that either self._dx or self._dy is not an integer.
> But more specifically, what is the 'type' it's referring to?
A type is the class of a value. For example, int, str and float are all
types.
If you show us the full traceback and some of your code we can be more
helpful.
Kent
More information about the Tutor
mailing list