]> granicus.if.org Git - python/commit
Make the error message for unsupported operand types cleaner, in
authorGuido van Rossum <guido@python.org>
Mon, 22 Oct 2001 04:12:44 +0000 (04:12 +0000)
committerGuido van Rossum <guido@python.org>
Mon, 22 Oct 2001 04:12:44 +0000 (04:12 +0000)
commit5c66a26dee41853a9ce43b75965cc16b8e34aef0
treed303f21f83853154614174dc1b6ed1891aa68315
parent279e74457351f4b6686d2b592f6662393bc8d757
Make the error message for unsupported operand types cleaner, in
response to a message by Laura Creighton on c.l.py.  E.g.

    >>> 0+''
    TypeError: unsupported operand types for +: 'int' and 'str'

(previously this did not mention the operand types)

    >>> ''+0
    TypeError: cannot concatenate 'str' and 'int' objects
Objects/abstract.c
Objects/stringobject.c