Object type problem
jonathan at ldis.com
Thu May 11 22:28:26 CEST 2000
Sorry if this is a really dumb question:
I get an odd (to me) error message when trying to do this:
logstr = now + ": " + strng + "\n"
the error message:
TypeError: __add__ nor __radd__ defined for these operands
now is a string
strng is _usually_ a string (or None/null, depending on the
circumstances). Maybe something else...?
The error never takes place when strng is a string of one or more
I understand that __add__ and __radd__ are special operator definitions,
and I'm assuming that when this error comes up, strng is not a string,
but another type of object that does not define these operators.
I've tried testing for strng==None, but this doesn't stop the error from
I've tried to figure out what class strng belongs to, but I can't seem
to do it.
Can anyone help me?
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 291 bytes
Desc: Card for Jonathan Donald
More information about the Python-list