TypeError

Steve Holden sholden at holdenweb.com
Thu Oct 26 12:32:58 EDT 2000


joonas wrote:
> 
> I get error, "TypeError: bad operand type(s) for -"
> 
> What could be wrong.
> 
> Joonas.

You're probably doing something daft like

	j = 3 - "fish"

or

	q = "list" - [0,2,1]

The minus operation is only defined on a limited range of data
types, and a TypeError exception is raised when the interpreter
can't figure out how to do the operation.

regards
 Steve
-- 
Helping people meet their information needs with training and technology.
703 967 0887      sholden at bellatlantic.net      http://www.holdenweb.com/





More information about the Python-list mailing list